summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog20
-rw-r--r--libnautilus-extensions/nautilus-customization-data.c7
-rw-r--r--libnautilus-extensions/nautilus-customization-data.h2
-rw-r--r--libnautilus-private/nautilus-customization-data.c7
-rw-r--r--libnautilus-private/nautilus-customization-data.h2
-rw-r--r--src/nautilus-property-browser.c16
-rw-r--r--src/nautilus-search-bar-criterion.c9
7 files changed, 49 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 75bbc15ee..58b23db7c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2000-09-05 Andy Hertzfeld <andy@eazel.com>
+
+ fixed bug 2610, can't delete duplicate colors from property browser.
+ Also, made property browser use anti-aliased item labels
+
+ * src/nautilus-property-browser.c: (remove_color),
+ (add_new_button_callback), (remove_button_callback),
+ (element_clicked_callback), (make_properties_from_directories):
+ fixed bug by checking for delete property when finding item to delete;
+ also, set up nautilus_buffered_widget properities for labels
+ * src/nautilus-search-bar-criterion.c: (make_emblem_value_menu):
+ made it use nautilus_label routines to access returned label text
+ * libnautilus-extensions/nautilus-customization-data.h:
+ changed type of label returned from GtkLabel to GtkWidget
+ * libnautilus-extensions/nautilus-customization-data.c:
+ (nautilus_customization_data_get_next_element_for_display):
+ return a nautilus_label instead of a gtk_label
+
2000-09-05 Mathieu Lacage <mathieu@eazel.com>
* components/tree/nautilus-tree-view.c:
@@ -9,6 +27,7 @@
(nautilus_self_check_search_uri): fix tests after rebecka
second break of them :)
+>>>>>>> 1.1695
2000-09-05 Darin Adler <darin@eazel.com>
* check-FIXME.pl: Removed some special-case file names
@@ -70,6 +89,7 @@
the invoking shell in the case where the parameters are not
consistent.
+>>>>>>> 1.1694
2000-09-05 Pavel Cisler <pavel@eazel.com>
* configure.in:
diff --git a/libnautilus-extensions/nautilus-customization-data.c b/libnautilus-extensions/nautilus-customization-data.c
index 1b4699f2f..86a0c7328 100644
--- a/libnautilus-extensions/nautilus-customization-data.c
+++ b/libnautilus-extensions/nautilus-customization-data.c
@@ -38,6 +38,7 @@
#include "nautilus-gdk-pixbuf-extensions.h"
#include "nautilus-file-utilities.h"
#include "nautilus-gdk-extensions.h"
+#include "nautilus-label.h"
#include "nautilus-string.h"
typedef enum {
@@ -140,7 +141,7 @@ GnomeVFSResult
nautilus_customization_data_get_next_element_for_display (NautilusCustomizationData *data,
char **emblem_name,
GtkWidget **pixmap_widget,
- GtkLabel **label)
+ GtkWidget **label)
{
GnomeVFSFileInfo *current_file_info;
@@ -207,7 +208,9 @@ nautilus_customization_data_get_next_element_for_display (NautilusCustomizationD
*pixmap_widget = GTK_WIDGET (gtk_pixmap_new (pixmap, mask));
filtered_name = format_name_for_display (current_file_info->name);
- *label = GTK_LABEL (gtk_label_new (filtered_name));
+ *label = nautilus_label_new (filtered_name);
+ nautilus_label_set_font_size (NAUTILUS_LABEL (*label), 12);
+
g_free (filtered_name);
if (data->reading_mode == READ_PRIVATE_CUSTOMIZATIONS) {
diff --git a/libnautilus-extensions/nautilus-customization-data.h b/libnautilus-extensions/nautilus-customization-data.h
index a45b6f820..42dd3afe5 100644
--- a/libnautilus-extensions/nautilus-customization-data.h
+++ b/libnautilus-extensions/nautilus-customization-data.h
@@ -55,7 +55,7 @@ GnomeVFSResult nautilus_customization_data_get_next_element_for_disp
GtkWidget **pixmap_widget,
- GtkLabel **label_widget);
+ GtkWidget **label_widget);
gboolean nautilus_customization_data_private_data_was_displayed (NautilusCustomizationData *data);
diff --git a/libnautilus-private/nautilus-customization-data.c b/libnautilus-private/nautilus-customization-data.c
index 1b4699f2f..86a0c7328 100644
--- a/libnautilus-private/nautilus-customization-data.c
+++ b/libnautilus-private/nautilus-customization-data.c
@@ -38,6 +38,7 @@
#include "nautilus-gdk-pixbuf-extensions.h"
#include "nautilus-file-utilities.h"
#include "nautilus-gdk-extensions.h"
+#include "nautilus-label.h"
#include "nautilus-string.h"
typedef enum {
@@ -140,7 +141,7 @@ GnomeVFSResult
nautilus_customization_data_get_next_element_for_display (NautilusCustomizationData *data,
char **emblem_name,
GtkWidget **pixmap_widget,
- GtkLabel **label)
+ GtkWidget **label)
{
GnomeVFSFileInfo *current_file_info;
@@ -207,7 +208,9 @@ nautilus_customization_data_get_next_element_for_display (NautilusCustomizationD
*pixmap_widget = GTK_WIDGET (gtk_pixmap_new (pixmap, mask));
filtered_name = format_name_for_display (current_file_info->name);
- *label = GTK_LABEL (gtk_label_new (filtered_name));
+ *label = nautilus_label_new (filtered_name);
+ nautilus_label_set_font_size (NAUTILUS_LABEL (*label), 12);
+
g_free (filtered_name);
if (data->reading_mode == READ_PRIVATE_CUSTOMIZATIONS) {
diff --git a/libnautilus-private/nautilus-customization-data.h b/libnautilus-private/nautilus-customization-data.h
index a45b6f820..42dd3afe5 100644
--- a/libnautilus-private/nautilus-customization-data.h
+++ b/libnautilus-private/nautilus-customization-data.h
@@ -55,7 +55,7 @@ GnomeVFSResult nautilus_customization_data_get_next_element_for_disp
GtkWidget **pixmap_widget,
- GtkLabel **label_widget);
+ GtkWidget **label_widget);
gboolean nautilus_customization_data_private_data_was_displayed (NautilusCustomizationData *data);
diff --git a/src/nautilus-property-browser.c b/src/nautilus-property-browser.c
index 840e5acc0..ccd88a66a 100644
--- a/src/nautilus-property-browser.c
+++ b/src/nautilus-property-browser.c
@@ -668,7 +668,8 @@ remove_color (NautilusPropertyBrowser *property_browser, const char* color_value
xmlNodePtr color_node = nautilus_xml_get_children (cur_node);
while (color_node != NULL) {
char* color_content = xmlNodeGetContent(color_node);
- if (color_content && !strcmp(color_content, color_value)) {
+ if (color_content && !strcmp(color_content, color_value) &&
+ !xmlGetProp (color_node, "deleted")) {
xmlSetProp(color_node, "deleted", "1");
break;
}
@@ -1209,6 +1210,7 @@ add_new_button_callback(GtkWidget *widget, NautilusPropertyBrowser *property_bro
if (property_browser->details->remove_mode) {
property_browser->details->remove_mode = FALSE;
nautilus_property_browser_update_contents(property_browser);
+ gtk_widget_show (property_browser->details->help_label);
return;
}
@@ -1231,6 +1233,7 @@ remove_button_callback(GtkWidget *widget, NautilusPropertyBrowser *property_brow
}
property_browser->details->remove_mode = TRUE;
+ gtk_widget_hide (property_browser->details->help_label);
nautilus_property_browser_update_contents(property_browser);
}
@@ -1254,6 +1257,7 @@ element_clicked_callback(GtkWidget *widget, GdkEventButton *event, char *element
nautilus_property_browser_remove_element(property_browser, element_name);
property_browser->details->remove_mode = FALSE;
nautilus_property_browser_update_contents(property_browser);
+ gtk_widget_show (property_browser->details->help_label);
return;
}
@@ -1361,7 +1365,7 @@ make_properties_from_directories (NautilusPropertyBrowser *property_browser)
NautilusCustomizationData *customization_data;
char *emblem_name;
GtkWidget *pixmap_widget;
- GtkLabel *label;
+ GtkWidget *label;
int index;
@@ -1398,8 +1402,12 @@ make_properties_from_directories (NautilusPropertyBrowser *property_browser)
gtk_container_add(GTK_CONTAINER(event_box), pixmap_widget);
gtk_box_pack_start(GTK_BOX(temp_vbox), event_box, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX(temp_vbox), GTK_WIDGET (label), FALSE, FALSE, 0);
- gtk_widget_show(GTK_WIDGET (label));
+ nautilus_buffered_widget_set_background_type (NAUTILUS_BUFFERED_WIDGET(label), NAUTILUS_BACKGROUND_SOLID);
+ nautilus_buffered_widget_set_background_color
+ (NAUTILUS_BUFFERED_WIDGET(label), NAUTILUS_RGB_COLOR_WHITE);
+
+ gtk_box_pack_start (GTK_BOX(temp_vbox), label, FALSE, FALSE, 0);
+ gtk_widget_show(label);
gtk_object_set_user_data (GTK_OBJECT(event_box), property_browser);
gtk_signal_connect_full
diff --git a/src/nautilus-search-bar-criterion.c b/src/nautilus-search-bar-criterion.c
index 9fc4d9465..43cd34cd1 100644
--- a/src/nautilus-search-bar-criterion.c
+++ b/src/nautilus-search-bar-criterion.c
@@ -45,6 +45,7 @@
#include <libnautilus-extensions/nautilus-file-utilities.h>
#include <libnautilus-extensions/nautilus-gtk-macros.h>
#include <libnautilus-extensions/nautilus-icon-factory.h>
+#include <libnautilus-extensions/nautilus-label.h>
#include <libnautilus-extensions/nautilus-search-uri.h>
#include <stdio.h>
#include <stdlib.h>
@@ -722,7 +723,7 @@ make_emblem_value_menu (NautilusSearchBarCriterion *criterion)
char *emblem_file_name;
char *emblem_display_name;
GtkWidget *emblem_pixmap_widget;
- GtkLabel *emblem_label;
+ GtkWidget *emblem_label;
GtkWidget *value_menu;
/* Add the items to the emblems menu here */
@@ -739,12 +740,12 @@ make_emblem_value_menu (NautilusSearchBarCriterion *criterion)
&emblem_label) == GNOME_VFS_OK) {
menu_item = gtk_menu_item_new ();
- gtk_label_get (emblem_label, &emblem_display_name);
- gtk_object_set_data (GTK_OBJECT (menu_item), "emblem name", emblem_display_name);
+ emblem_display_name = nautilus_label_get_text (NAUTILUS_LABEL (emblem_label));
+ gtk_object_set_data_full (GTK_OBJECT (menu_item), "emblem name", emblem_display_name, g_free);
temp_hbox = gtk_hbox_new (FALSE, GNOME_PAD_SMALL);
gtk_container_add (GTK_CONTAINER (menu_item), temp_hbox);
gtk_box_pack_start (GTK_BOX (temp_hbox), emblem_pixmap_widget, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (temp_hbox), GTK_WIDGET (emblem_label), FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (temp_hbox), emblem_label, FALSE, FALSE, 0);
gtk_menu_append (GTK_MENU (value_menu), menu_item);
}