summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarin Adler <darin@src.gnome.org>2002-01-08 22:37:57 +0000
committerDarin Adler <darin@src.gnome.org>2002-01-08 22:37:57 +0000
commit2bab818c8682513cb9f7dc6d88b9644ebea0a8f5 (patch)
treee6ec9a4386de36ca8362f8ee81c827d978d04cb2
parentb790895feafbf897418b5f318595b0849a9c3fe7 (diff)
downloadnautilus-2bab818c8682513cb9f7dc6d88b9644ebea0a8f5.tar.gz
Remove. Remove nautilus-help.desktop since Nautilus isn't the help browser
* .cvsignore: * Makefile.am: * nautilus-help.desktop.in: Remove. Remove nautilus-help.desktop since Nautilus isn't the help browser any more. * components/adapter/nautilus-adapter-load-strategy.c: (nautilus_adapter_load_strategy_class_init): * components/news/nautilus-news.c: (set_up_main_widgets): * libnautilus-private/nautilus-bookmark.c: (nautilus_bookmark_class_init): * libnautilus-private/nautilus-volume-monitor.c: (nautilus_volume_monitor_class_init): * src/file-manager/fm-desktop-icon-view.c: (fm_desktop_icon_view_destroy), (fm_desktop_icon_view_handle_middle_click), (delayed_init), (fm_desktop_icon_view_init), (desktop_icons_compare_callback): * src/nautilus-sidebar.c: (nautilus_sidebar_finalize), (nautilus_sidebar_update_buttons), (nautilus_sidebar_set_uri): Use more g_signal, less gtk_signal stuff. * components/hardware/nautilus-hardware-view.c: (setup_form_title), (setup_overview_form), (setup_CPU_form), (setup_RAM_form), (setup_IDE_form): * components/news/nautilus-news.c: (set_up_main_widgets): * src/file-manager/nautilus-indexing-info.c: (update_progress_display), (last_index_time_dialog_new), (index_progress_dialog_new): * src/nautilus-property-browser.c: (nautilus_property_browser_init), (element_clicked_callback), (labeled_image_new), (make_properties_from_directories), (add_reset_property), (make_properties_from_xml_node): * src/nautilus-sidebar-title.c: (nautilus_sidebar_title_init), (nautilus_sidebar_title_select_text_color), (update_title_font), (update_title), (update_more_info), (sidebar_title_create_title_label), (sidebar_title_create_more_info_label): Port more code from EelLabel to GtkLabel. Also change all code that was using things like "make_larger" to use "set_scale" now. * components/music/nautilus-music-view.c: (xpm_label_box), (xpm_dual_label_box), (nautilus_music_view_set_album_image): * libnautilus-private/nautilus-bookmark.c: (create_image_widget_for_bookmark), (nautilus_bookmark_menu_item_new): * src/nautilus-complex-search-bar.c: (load_find_them_pixmap_widget): Port more code from GtkPixmap to GtkImage. * components/notes/nautilus-notes.c: * components/throbber/nautilus-throbber.c: * src/file-manager/fm-properties-window.c: * src/nautilus-zoom-control.c: Remove extra includes. * libnautilus-private/nautilus-icon-factory.c: * libnautilus-private/nautilus-icon-factory.h: Remove nautilus_icon_factory_get_pixmap_and_mask_for_file. * src/nautilus-about.c: (draw_aa_string), (draw_author_list), (nautilus_about_draw_info): Port to use Pango to draw the text. It looks really bad right now, but should be straightforward to fix.
-rw-r--r--.cvsignore1
-rw-r--r--ChangeLog65
-rw-r--r--Makefile.am4
-rw-r--r--components/adapter/nautilus-adapter-load-strategy.c6
-rw-r--r--components/hardware/nautilus-hardware-view.c41
-rw-r--r--components/music/nautilus-music-view.c30
-rw-r--r--components/news/nautilus-news.c24
-rw-r--r--components/notes/nautilus-notes.c1
-rw-r--r--components/throbber/nautilus-throbber.c2
-rw-r--r--libnautilus-private/nautilus-bookmark.c39
-rw-r--r--libnautilus-private/nautilus-icon-container.c11
-rw-r--r--libnautilus-private/nautilus-icon-factory.c27
-rw-r--r--libnautilus-private/nautilus-icon-factory.h8
-rw-r--r--libnautilus-private/nautilus-volume-monitor.c8
-rw-r--r--nautilus-help.desktop.in8
-rw-r--r--src/file-manager/fm-desktop-icon-view.c39
-rw-r--r--src/file-manager/fm-properties-window.c2
-rw-r--r--src/file-manager/nautilus-indexing-info.c17
-rw-r--r--src/nautilus-about.c46
-rw-r--r--src/nautilus-complex-search-bar.c19
-rw-r--r--src/nautilus-information-panel.c22
-rw-r--r--src/nautilus-property-browser.c44
-rw-r--r--src/nautilus-sidebar-title.c94
-rw-r--r--src/nautilus-sidebar.c22
-rw-r--r--src/nautilus-zoom-control.c1
25 files changed, 255 insertions, 326 deletions
diff --git a/.cvsignore b/.cvsignore
index 27c4826c6..caf4ab63d 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -21,7 +21,6 @@ libtool
ltconfig
ltmain.sh
nautilus-*.tar.gz
-nautilus-help.desktop
nautilus.desktop
nautilus.spec
obj
diff --git a/ChangeLog b/ChangeLog
index b0006aeac..edb95e133 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,68 @@
+2002-01-08 Darin Adler <darin@bentspoon.com>
+
+ * .cvsignore:
+ * Makefile.am:
+ * nautilus-help.desktop.in: Remove.
+ Remove nautilus-help.desktop since Nautilus isn't the help browser
+ any more.
+
+ * components/adapter/nautilus-adapter-load-strategy.c:
+ (nautilus_adapter_load_strategy_class_init):
+ * components/news/nautilus-news.c: (set_up_main_widgets):
+ * libnautilus-private/nautilus-bookmark.c:
+ (nautilus_bookmark_class_init):
+ * libnautilus-private/nautilus-volume-monitor.c:
+ (nautilus_volume_monitor_class_init):
+ * src/file-manager/fm-desktop-icon-view.c:
+ (fm_desktop_icon_view_destroy),
+ (fm_desktop_icon_view_handle_middle_click), (delayed_init),
+ (fm_desktop_icon_view_init), (desktop_icons_compare_callback):
+ * src/nautilus-sidebar.c: (nautilus_sidebar_finalize),
+ (nautilus_sidebar_update_buttons), (nautilus_sidebar_set_uri):
+ Use more g_signal, less gtk_signal stuff.
+
+ * components/hardware/nautilus-hardware-view.c: (setup_form_title),
+ (setup_overview_form), (setup_CPU_form), (setup_RAM_form),
+ (setup_IDE_form):
+ * components/news/nautilus-news.c: (set_up_main_widgets):
+ * src/file-manager/nautilus-indexing-info.c:
+ (update_progress_display), (last_index_time_dialog_new),
+ (index_progress_dialog_new):
+ * src/nautilus-property-browser.c:
+ (nautilus_property_browser_init), (element_clicked_callback),
+ (labeled_image_new), (make_properties_from_directories),
+ (add_reset_property), (make_properties_from_xml_node):
+ * src/nautilus-sidebar-title.c: (nautilus_sidebar_title_init),
+ (nautilus_sidebar_title_select_text_color), (update_title_font),
+ (update_title), (update_more_info),
+ (sidebar_title_create_title_label),
+ (sidebar_title_create_more_info_label):
+ Port more code from EelLabel to GtkLabel. Also change all code that
+ was using things like "make_larger" to use "set_scale" now.
+
+ * components/music/nautilus-music-view.c: (xpm_label_box),
+ (xpm_dual_label_box), (nautilus_music_view_set_album_image):
+ * libnautilus-private/nautilus-bookmark.c:
+ (create_image_widget_for_bookmark),
+ (nautilus_bookmark_menu_item_new):
+ * src/nautilus-complex-search-bar.c:
+ (load_find_them_pixmap_widget):
+ Port more code from GtkPixmap to GtkImage.
+
+ * components/notes/nautilus-notes.c:
+ * components/throbber/nautilus-throbber.c:
+ * src/file-manager/fm-properties-window.c:
+ * src/nautilus-zoom-control.c:
+ Remove extra includes.
+
+ * libnautilus-private/nautilus-icon-factory.c:
+ * libnautilus-private/nautilus-icon-factory.h:
+ Remove nautilus_icon_factory_get_pixmap_and_mask_for_file.
+
+ * src/nautilus-about.c: (draw_aa_string), (draw_author_list),
+ (nautilus_about_draw_info): Port to use Pango to draw the text. It
+ looks really bad right now, but should be straightforward to fix.
+
2002-01-08 Anders Carlsson <andersca@gnu.org>
* libnautilus-private/nautilus-bonobo-extensions.c (activation_handle_free):
diff --git a/Makefile.am b/Makefile.am
index cf0b46f60..731540c0d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@ include $(top_srcdir)/Makefile.shared
@INTLTOOL_DESKTOP_RULE@
-DESKTOP_IN_FILES=nautilus.desktop.in nautilus-help.desktop.in
+DESKTOP_IN_FILES=nautilus.desktop.in
DESKTOP_FILES=$(DESKTOP_IN_FILES:.desktop.in=.desktop)
SUBDIRS = \
@@ -30,8 +30,6 @@ EXTRA_DIST= \
nautilus.spec.in \
nautilus.desktop \
nautilus.desktop.in \
- nautilus-help.desktop \
- nautilus-help.desktop.in \
nautilus-launch-icon.png \
gnome-starthere-96.png \
gnome-starthere.png \
diff --git a/components/adapter/nautilus-adapter-load-strategy.c b/components/adapter/nautilus-adapter-load-strategy.c
index a0c7952f8..5f79644ce 100644
--- a/components/adapter/nautilus-adapter-load-strategy.c
+++ b/components/adapter/nautilus-adapter-load-strategy.c
@@ -83,7 +83,7 @@ nautilus_adapter_load_strategy_class_init (NautilusAdapterLoadStrategyClass *kla
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (NautilusAdapterLoadStrategyClass, report_load_underway),
NULL, NULL,
- gtk_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[REPORT_LOAD_PROGRESS] =
g_signal_new ("report_load_progress",
@@ -99,7 +99,7 @@ nautilus_adapter_load_strategy_class_init (NautilusAdapterLoadStrategyClass *kla
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (NautilusAdapterLoadStrategyClass, report_load_complete),
NULL, NULL,
- gtk_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[REPORT_LOAD_FAILED] =
g_signal_new ("report_load_failed",
@@ -107,7 +107,7 @@ nautilus_adapter_load_strategy_class_init (NautilusAdapterLoadStrategyClass *kla
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (NautilusAdapterLoadStrategyClass, report_load_failed),
NULL, NULL,
- gtk_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}
diff --git a/components/hardware/nautilus-hardware-view.c b/components/hardware/nautilus-hardware-view.c
index 7b9c76496..fc0603085 100644
--- a/components/hardware/nautilus-hardware-view.c
+++ b/components/hardware/nautilus-hardware-view.c
@@ -454,8 +454,8 @@ setup_form_title (NautilusHardwareView *view,
}
}
- temp_widget = eel_label_new (title_text);
- eel_label_make_larger (EEL_LABEL (temp_widget), 10);
+ temp_widget = gtk_label_new (title_text);
+ eel_gtk_label_set_scale (GTK_LABEL (temp_widget), PANGO_SCALE_X_LARGE);
gtk_box_pack_start (GTK_BOX (temp_container), temp_widget, 0, 0, 8);
gtk_widget_show (temp_widget);
@@ -536,8 +536,8 @@ setup_overview_form (NautilusHardwareView *view)
gtk_widget_show (temp_widget);
g_free (file_name);
- temp_widget = eel_label_new (temp_text);
- eel_label_make_larger (EEL_LABEL (temp_widget), 2);
+ temp_widget = gtk_label_new (temp_text);
+ eel_gtk_label_set_scale (GTK_LABEL (temp_widget), PANGO_SCALE_LARGE);
g_free(temp_text);
gtk_box_pack_start(GTK_BOX(temp_box), temp_widget, 0, 0, 0 );
gtk_widget_show (temp_widget);
@@ -557,8 +557,8 @@ setup_overview_form (NautilusHardwareView *view)
g_free (file_name);
temp_text = get_RAM_description ();
- temp_widget = eel_label_new (temp_text);
- eel_label_make_larger (EEL_LABEL (temp_widget), 2);
+ temp_widget = gtk_label_new (temp_text);
+ eel_gtk_label_set_scale (GTK_LABEL (temp_widget), PANGO_SCALE_LARGE);
g_free (temp_text);
gtk_box_pack_start (GTK_BOX(temp_box), temp_widget, 0, 0, 0 );
gtk_widget_show (temp_widget);
@@ -596,9 +596,9 @@ setup_overview_form (NautilusHardwareView *view)
g_free(ide_media);
temp_text = get_IDE_description (device);
- temp_widget = eel_label_new (temp_text);
- eel_label_make_larger (EEL_LABEL (temp_widget), 2);
- eel_label_set_justify (EEL_LABEL (temp_widget), GTK_JUSTIFY_CENTER);
+ temp_widget = gtk_label_new (temp_text);
+ eel_gtk_label_set_scale (GTK_LABEL (temp_widget), PANGO_SCALE_LARGE);
+ gtk_label_set_justify (GTK_LABEL (temp_widget), GTK_JUSTIFY_CENTER);
g_free(temp_text);
gtk_box_pack_start(GTK_BOX(temp_box), temp_widget, 0, 0, 0);
@@ -612,10 +612,7 @@ setup_overview_form (NautilusHardwareView *view)
/* allocate the uptime label */
view->details->uptime_label = GTK_LABEL (gtk_label_new (""));
-#if GNOME2_CONVERSION_COMPLETE
- eel_label_make_larger (view->details->uptime_label, 2);
- eel_label_set_justify (view->details->uptime_label, GTK_JUSTIFY_LEFT);
-#endif
+ eel_gtk_label_set_scale (view->details->uptime_label, PANGO_SCALE_LARGE);
gtk_box_pack_end (GTK_BOX (view->details->form), GTK_WIDGET (view->details->uptime_label), 0, 0, GNOME_PAD);
update_uptime_text (view);
@@ -642,9 +639,9 @@ setup_CPU_form (NautilusHardwareView *view)
setup_form_title (view, NULL, "CPU");
message = _("This is a placeholder for the CPU page.");
- temp_widget = eel_label_new (message);
- eel_label_make_larger (EEL_LABEL (temp_widget), 2);
- eel_label_set_wrap(EEL_LABEL(temp_widget), TRUE);
+ temp_widget = gtk_label_new (message);
+ eel_gtk_label_set_scale (GTK_LABEL (temp_widget), PANGO_SCALE_LARGE);
+ gtk_label_set_wrap (GTK_LABEL (temp_widget), TRUE);
gtk_box_pack_start(GTK_BOX(view->details->form), temp_widget, 0, 0, 12);
gtk_widget_show (temp_widget);
@@ -667,9 +664,9 @@ setup_RAM_form (NautilusHardwareView *view)
setup_form_title (view, NULL, "RAM");
message = _("This is a placeholder for the RAM page.");
- temp_widget = eel_label_new (message);
- eel_label_make_larger (EEL_LABEL (temp_widget), 2);
- eel_label_set_wrap(EEL_LABEL(temp_widget), TRUE);
+ temp_widget = gtk_label_new (message);
+ eel_gtk_label_set_scale (GTK_LABEL (temp_widget), PANGO_SCALE_LARGE);
+ gtk_label_set_wrap (GTK_LABEL (temp_widget), TRUE);
gtk_box_pack_start(GTK_BOX(view->details->form), temp_widget, 0, 0, 12);
gtk_widget_show (temp_widget);
@@ -692,9 +689,9 @@ setup_IDE_form (NautilusHardwareView *view)
setup_form_title (view, NULL, "IDE");
message = _("This is a placeholder for the IDE page.");
- temp_widget = eel_label_new (message);
- eel_label_make_larger (EEL_LABEL (temp_widget), 2);
- eel_label_set_wrap(EEL_LABEL(temp_widget), TRUE);
+ temp_widget = gtk_label_new (message);
+ eel_gtk_label_set_scale (GTK_LABEL (temp_widget), PANGO_SCALE_LARGE);
+ gtk_label_set_wrap (GTK_LABEL (temp_widget), TRUE);
gtk_box_pack_start(GTK_BOX(view->details->form), temp_widget, 0, 0, 12);
gtk_widget_show (temp_widget);
diff --git a/components/music/nautilus-music-view.c b/components/music/nautilus-music-view.c
index c15801923..df1e13561 100644
--- a/components/music/nautilus-music-view.c
+++ b/components/music/nautilus-music-view.c
@@ -1395,8 +1395,6 @@ static GtkWidget *
xpm_label_box (NautilusMusicView *music_view, char * xpm_data[])
{
GdkPixbuf *pixbuf;
- GdkPixmap *pixmap;
- GdkBitmap *mask;
GtkWidget *pix_widget;
GtkWidget *box;
GtkStyle *style;
@@ -1406,12 +1404,13 @@ xpm_label_box (NautilusMusicView *music_view, char * xpm_data[])
style = gtk_widget_get_style (GTK_WIDGET (music_view->details->event_box));
pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **)xpm_data);
- gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pixmap, &mask, GDK_PIXBUF_ALPHA_FULL);
- pix_widget = gtk_pixmap_new (pixmap, mask);
+ pix_widget = gtk_image_new_from_pixbuf (pixbuf);
gtk_box_pack_start (GTK_BOX (box), pix_widget, TRUE, FALSE, 3);
gtk_widget_show (pix_widget);
+ g_object_unref (pixbuf);
+
return box;
}
@@ -1424,8 +1423,6 @@ xpm_dual_label_box (NautilusMusicView *music_view, char * xpm_data[],
{
GtkWidget *box;
GtkStyle *style;
- GdkPixmap *pixmap;
- GdkBitmap *mask;
GdkPixbuf *pixbuf;
@@ -1436,18 +1433,16 @@ xpm_dual_label_box (NautilusMusicView *music_view, char * xpm_data[],
/* create the main pixwidget */
pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **)xpm_data);
- gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pixmap, &mask, GDK_PIXBUF_ALPHA_FULL);
-
- *main_pixwidget = gtk_pixmap_new (pixmap, mask);
+ *main_pixwidget = gtk_image_new_from_pixbuf (pixbuf);
+ g_object_unref (pixbuf);
gtk_box_pack_start (GTK_BOX (box), *main_pixwidget, TRUE, FALSE, 3);
gtk_widget_show (*main_pixwidget);
/* create the alternative pixwidget */
pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **)alt_xpm_data);
- gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pixmap, &mask, GDK_PIXBUF_ALPHA_FULL);
-
- *alt_pixwidget = gtk_pixmap_new (pixmap, mask);
+ *alt_pixwidget = gtk_image_new_from_pixbuf (pixbuf);
+ g_object_unref (pixbuf);
gtk_box_pack_start (GTK_BOX (box), *alt_pixwidget, TRUE, FALSE, 3);
gtk_widget_hide (*alt_pixwidget);
@@ -1602,8 +1597,6 @@ nautilus_music_view_set_album_image (NautilusMusicView *music_view, const char *
char* image_path;
GdkPixbuf *pixbuf;
GdkPixbuf *scaled_pixbuf;
- GdkPixmap *pixmap;
- GdkBitmap *mask;
if (image_path_uri != NULL) {
image_path = gnome_vfs_get_local_path_from_uri (image_path_uri);
@@ -1613,16 +1606,15 @@ nautilus_music_view_set_album_image (NautilusMusicView *music_view, const char *
scaled_pixbuf = eel_gdk_pixbuf_scale_down_to_fit (pixbuf, SCALED_IMAGE_WIDTH, SCALED_IMAGE_HEIGHT);
g_object_unref (pixbuf);
- gdk_pixbuf_render_pixmap_and_mask (scaled_pixbuf, &pixmap, &mask, EEL_STANDARD_ALPHA_THRESHHOLD);
- g_object_unref (scaled_pixbuf);
-
if (music_view->details->album_image == NULL) {
- music_view->details->album_image = gtk_pixmap_new (pixmap, mask);
+ music_view->details->album_image = gtk_image_new_from_pixbuf (scaled_pixbuf);
gtk_box_pack_start (GTK_BOX (music_view->details->image_box),
music_view->details->album_image, FALSE, FALSE, 2);
} else {
- gtk_pixmap_set (GTK_PIXMAP (music_view->details->album_image), pixmap, mask);
+ gtk_image_set_from_pixbuf (GTK_IMAGE (music_view->details->album_image), scaled_pixbuf);
}
+
+ g_object_unref (scaled_pixbuf);
gtk_widget_show (music_view->details->album_image);
diff --git a/components/news/nautilus-news.c b/components/news/nautilus-news.c
index c9ba5be2d..72b03c512 100644
--- a/components/news/nautilus-news.c
+++ b/components/news/nautilus-news.c
@@ -31,6 +31,7 @@
#include <time.h>
#include <gtk/gtkcheckbutton.h>
+#include <gtk/gtkclist.h>
#include <gtk/gtkdrawingarea.h>
#include <gtk/gtkframe.h>
#include <gtk/gtkhbbox.h>
@@ -2414,27 +2415,24 @@ set_up_main_widgets (News *news, GtkWidget *container)
/* add the empty message */
news->empty_message = gtk_label_new (_("The News panel displays current headlines from your favorite websites. Click the \'Select Sites\' button to select the sites to display."));
-#if GNOME2_CONVERSION_COMPLETE
- eel_label_set_smooth_font_size (EEL_LABEL (news->empty_message), 14);
- eel_label_set_justify (EEL_LABEL (news->empty_message), GTK_JUSTIFY_LEFT);
- eel_label_set_wrap (EEL_LABEL (news->empty_message), TRUE);
-#endif
+ eel_gtk_label_set_scale (GTK_LABEL (news->empty_message), PANGO_SCALE_LARGE);
+ gtk_label_set_line_wrap (GTK_LABEL (news->empty_message), TRUE);
gtk_box_pack_start (GTK_BOX (news->main_box), news->empty_message, TRUE,
- TRUE, 0);
+ TRUE, 0);
/* connect the appropriate signals for drawing and event handling */
g_signal_connect (news->news_display, "expose_event",
- (GtkSignalFunc) nautilus_news_expose_event, news);
- gtk_signal_connect (GTK_OBJECT(news->news_display),"configure_event",
- (GtkSignalFunc) nautilus_news_configure_event, news);
-
+ G_CALLBACK (nautilus_news_expose_event), news);
+ g_signal_connect (news->news_display,"configure_event",
+ G_CALLBACK (nautilus_news_configure_event), news);
+
g_signal_connect (news->news_display, "motion_notify_event",
- (GtkSignalFunc) nautilus_news_motion_notify_event, news);
+ G_CALLBACK (nautilus_news_motion_notify_event), news);
g_signal_connect (news->news_display, "leave_notify_event",
- (GtkSignalFunc) nautilus_news_leave_notify_event, news);
+ G_CALLBACK (nautilus_news_leave_notify_event), news);
g_signal_connect (news->news_display, "button_release_event",
- (GtkSignalFunc) nautilus_news_button_release_event, news);
+ G_CALLBACK (nautilus_news_button_release_event), news);
gtk_widget_set_events (news->news_display, GDK_EXPOSURE_MASK
| GDK_LEAVE_NOTIFY_MASK
diff --git a/components/notes/nautilus-notes.c b/components/notes/nautilus-notes.c
index c78561016..1c5b0dd5e 100644
--- a/components/notes/nautilus-notes.c
+++ b/components/notes/nautilus-notes.c
@@ -32,6 +32,7 @@
#include <eel/eel-gtk-extensions.h>
#include <eel/eel-string.h>
#include <gtk/gtkmain.h>
+#include <gtk/gtksignal.h>
#include <gtk/gtktextbuffer.h>
#include <gtk/gtktextview.h>
#include <gtk/gtkvbox.h>
diff --git a/components/throbber/nautilus-throbber.c b/components/throbber/nautilus-throbber.c
index 4d298d539..fb9b59ced 100644
--- a/components/throbber/nautilus-throbber.c
+++ b/components/throbber/nautilus-throbber.c
@@ -38,7 +38,6 @@
#include <gtk/gtksignal.h>
#include <libgnome/gnome-macros.h>
#include <libgnome/gnome-util.h>
-#include <libgnomeui/gnome-pixmap.h>
#include <libnautilus-private/nautilus-file-utilities.h>
#include <libnautilus-private/nautilus-global-preferences.h>
#include <libnautilus-private/nautilus-icon-factory.h>
@@ -276,7 +275,6 @@ nautilus_throbber_instance_init (NautilusThrobber *throbber)
bonobo_property_bag_add (throbber->details->property_bag, "location", LOCATION, BONOBO_ARG_STRING, NULL,
"associated URL", 0);
- /* allocate the pixmap that holds the image */
nautilus_throbber_load_images (throbber);
gtk_widget_show (widget);
diff --git a/libnautilus-private/nautilus-bookmark.c b/libnautilus-private/nautilus-bookmark.c
index 287bb05f1..5461f66cf 100644
--- a/libnautilus-private/nautilus-bookmark.c
+++ b/libnautilus-private/nautilus-bookmark.c
@@ -32,7 +32,9 @@
#include <eel/eel-string.h>
#include <eel/eel-vfs-extensions.h>
#include <gtk/gtkaccellabel.h>
+#include <gtk/gtkimage.h>
#include <gtk/gtkimagemenuitem.h>
+#include <gtk/gtksignal.h>
#include <libgnome/gnome-util.h>
#include <libgnomevfs/gnome-vfs-types.h>
#include <libgnomevfs/gnome-vfs-uri.h>
@@ -61,7 +63,6 @@ static void nautilus_bookmark_connect_file (NautilusBookmark *file);
static void nautilus_bookmark_disconnect_file (NautilusBookmark *file);
static void nautilus_bookmark_class_init (NautilusBookmarkClass *class);
static void nautilus_bookmark_init (NautilusBookmark *bookmark);
-static GtkWidget *create_pixmap_widget_for_bookmark (NautilusBookmark *bookmark);
EEL_CLASS_BOILERPLATE (NautilusBookmark, nautilus_bookmark, GTK_TYPE_OBJECT)
@@ -103,7 +104,7 @@ nautilus_bookmark_class_init (NautilusBookmarkClass *class)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (NautilusBookmarkClass, appearance_changed),
NULL, NULL,
- gtk_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[CONTENTS_CHANGED] =
@@ -112,7 +113,7 @@ nautilus_bookmark_class_init (NautilusBookmarkClass *class)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (NautilusBookmarkClass, contents_changed),
NULL, NULL,
- gtk_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}
@@ -535,23 +536,24 @@ nautilus_bookmark_new_with_icon (const char *uri, const char *name,
}
static GtkWidget *
-create_pixmap_widget_for_bookmark (NautilusBookmark *bookmark)
+create_image_widget_for_bookmark (NautilusBookmark *bookmark)
{
- GdkPixmap *gdk_pixmap;
- GdkBitmap *mask;
+ GdkPixbuf *pixbuf;
+ GtkWidget *widget;
- if (!nautilus_bookmark_get_pixmap_and_mask (bookmark,
- NAUTILUS_ICON_SIZE_FOR_MENUS,
- &gdk_pixmap,
- &mask)) {
+ pixbuf = nautilus_bookmark_get_pixbuf (bookmark, NAUTILUS_ICON_SIZE_FOR_MENUS, FALSE);
+ if (pixbuf == NULL) {
return NULL;
}
- return gtk_pixmap_new (gdk_pixmap, mask);
+ widget = gtk_image_new_from_pixbuf (pixbuf);
+
+ g_object_unref (pixbuf);
+ return widget;
}
/**
- * nautilus_bookmarnuk_menu_item_new:
+ * nautilus_bookmark_menu_item_new:
*
* Return a menu item representing a bookmark.
* @bookmark: The bookmark the menu item represents.
@@ -561,18 +563,17 @@ GtkWidget *
nautilus_bookmark_menu_item_new (NautilusBookmark *bookmark)
{
GtkWidget *menu_item;
- GtkWidget *pixmap_widget;
+ GtkWidget *image_widget;
GtkWidget *label;
char *display_name;
menu_item = gtk_image_menu_item_new ();
- pixmap_widget = create_pixmap_widget_for_bookmark (bookmark);
- if (pixmap_widget != NULL) {
- gtk_widget_show (pixmap_widget);
-
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), \
- pixmap_widget);
+ image_widget = create_image_widget_for_bookmark (bookmark);
+ if (image_widget != NULL) {
+ gtk_widget_show (image_widget);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item),
+ image_widget);
}
display_name = eel_truncate_text_for_menu_item (bookmark->details->name);
label = gtk_label_new (display_name);
diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c
index bbb3b0f3b..758e07544 100644
--- a/libnautilus-private/nautilus-icon-container.c
+++ b/libnautilus-private/nautilus-icon-container.c
@@ -3747,7 +3747,6 @@ nautilus_icon_container_update_icon (NautilusIconContainer *container,
GdkPixbuf *pixbuf, *emblem_pixbuf, *saved_pixbuf;
GList *emblem_scalable_icons, *emblem_pixbufs, *p;
char *editable_text, *additional_text;
- GdkFont *font;
if (icon == NULL) {
return;
@@ -3840,12 +3839,12 @@ nautilus_icon_container_update_icon (NautilusIconContainer *container,
end_renaming_mode (container, FALSE);
}
- font = details->label_font[details->zoom_level];
-
gnome_canvas_item_set (GNOME_CANVAS_ITEM (icon->item),
"editable_text", editable_text,
"additional_text", additional_text,
- "font", font,
+#if GNOME2_CONVERSION_COMPLETE
+ "font", details->label_font[details->zoom_level],
+#endif
"highlighted_for_drop", icon == details->drop_target,
NULL);
@@ -5002,12 +5001,12 @@ nautilus_icon_container_set_label_font_for_zoom_level (NautilusIconContainer *co
g_return_if_fail (zoom_level >= NAUTILUS_ZOOM_LEVEL_SMALLEST);
g_return_if_fail (zoom_level <= NAUTILUS_ZOOM_LEVEL_LARGEST);
+ gdk_font_ref (font);
+
if (container->details->label_font[zoom_level] != NULL) {
gdk_font_unref (container->details->label_font[zoom_level]);
}
- gdk_font_ref (font);
-
container->details->label_font[zoom_level] = font;
}
diff --git a/libnautilus-private/nautilus-icon-factory.c b/libnautilus-private/nautilus-icon-factory.c
index 8b057915b..9b8ba647f 100644
--- a/libnautilus-private/nautilus-icon-factory.c
+++ b/libnautilus-private/nautilus-icon-factory.c
@@ -2152,33 +2152,6 @@ nautilus_icon_factory_get_pixbuf_for_file (NautilusFile *file,
return pixbuf;
}
-/* Convenience cover for nautilus_icon_factory_get_icon_for_file,
- * nautilus_icon_factory_get_pixbuf_for_icon,
- * and gdk_pixbuf_render_pixmap_and_mask.
- */
-void
-nautilus_icon_factory_get_pixmap_and_mask_for_file (NautilusFile *file,
- const char *modifer,
- guint size_in_pixels,
- GdkPixmap **pixmap,
- GdkBitmap **mask)
-{
- GdkPixbuf *pixbuf;
-
- g_return_if_fail (pixmap != NULL);
- g_return_if_fail (mask != NULL);
-
- *pixmap = NULL;
- *mask = NULL;
-
- pixbuf = nautilus_icon_factory_get_pixbuf_for_file (file, modifer, size_in_pixels, FALSE);
- if (pixbuf == NULL) {
- return;
- }
- gdk_pixbuf_render_pixmap_and_mask (pixbuf, pixmap, mask, EEL_STANDARD_ALPHA_THRESHHOLD);
- g_object_unref (pixbuf);
-}
-
/* Convenience routine for getting a pixbuf from an icon name. */
GdkPixbuf *
nautilus_icon_factory_get_pixbuf_from_name (const char *icon_name,
diff --git a/libnautilus-private/nautilus-icon-factory.h b/libnautilus-private/nautilus-icon-factory.h
index 448389425..07ed3c996 100644
--- a/libnautilus-private/nautilus-icon-factory.h
+++ b/libnautilus-private/nautilus-icon-factory.h
@@ -140,14 +140,6 @@ GdkPixbuf * nautilus_icon_factory_get_pixbuf_for_file (Nautil
guint size_in_pixels,
gboolean optimized_for_anti_aliasing);
-/* Convenience functions for legacy interfaces that require a pixmap and
- * bitmap. Maybe we can get rid of these one day.
- */
-void nautilus_icon_factory_get_pixmap_and_mask_for_file (NautilusFile *file,
- const char *modifer,
- guint size_in_pixels,
- GdkPixmap **pixmap,
- GdkBitmap **mask);
/* Convenience routine for getting a pixbuf from an icon name
*/
GdkPixbuf * nautilus_icon_factory_get_pixbuf_from_name (const char *icon_name,
diff --git a/libnautilus-private/nautilus-volume-monitor.c b/libnautilus-private/nautilus-volume-monitor.c
index 1aa95ad72..639a39124 100644
--- a/libnautilus-private/nautilus-volume-monitor.c
+++ b/libnautilus-private/nautilus-volume-monitor.c
@@ -305,7 +305,7 @@ nautilus_volume_monitor_class_init (NautilusVolumeMonitorClass *klass)
G_STRUCT_OFFSET (NautilusVolumeMonitorClass,
volume_mounted),
NULL, NULL,
- gtk_marshal_VOID__POINTER,
+ g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
signals[VOLUME_UNMOUNT_STARTED]
@@ -315,7 +315,7 @@ nautilus_volume_monitor_class_init (NautilusVolumeMonitorClass *klass)
G_STRUCT_OFFSET (NautilusVolumeMonitorClass,
volume_unmount_started),
NULL, NULL,
- gtk_marshal_VOID__POINTER,
+ g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
signals[VOLUME_UNMOUNT_FAILED]
@@ -325,7 +325,7 @@ nautilus_volume_monitor_class_init (NautilusVolumeMonitorClass *klass)
G_STRUCT_OFFSET (NautilusVolumeMonitorClass,
volume_unmount_failed),
NULL, NULL,
- gtk_marshal_VOID__POINTER,
+ g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
signals[VOLUME_UNMOUNTED]
@@ -335,7 +335,7 @@ nautilus_volume_monitor_class_init (NautilusVolumeMonitorClass *klass)
G_STRUCT_OFFSET (NautilusVolumeMonitorClass,
volume_unmounted),
NULL, NULL,
- gtk_marshal_VOID__POINTER,
+ g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
/* Check environment a bit. */
diff --git a/nautilus-help.desktop.in b/nautilus-help.desktop.in
deleted file mode 100644
index ff1394821..000000000
--- a/nautilus-help.desktop.in
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-_Name=Help
-_Comment=Documentation
-Exec=nautilus --no-default-window --no-desktop ghelp:toc
-Icon=gnome-help.png
-Terminal=0
-Type=Application
-Categories=Application;Core;
diff --git a/src/file-manager/fm-desktop-icon-view.c b/src/file-manager/fm-desktop-icon-view.c
index dc41369aa..0693f5dd6 100644
--- a/src/file-manager/fm-desktop-icon-view.c
+++ b/src/file-manager/fm-desktop-icon-view.c
@@ -33,6 +33,7 @@
#include <dirent.h>
#include <eel/eel-glib-extensions.h>
#include <eel/eel-gnome-extensions.h>
+#include <eel/eel-gobject-extensions.h>
#include <eel/eel-gtk-extensions.h>
#include <eel/eel-gtk-macros.h>
#include <eel/eel-stock-dialogs.h>
@@ -83,8 +84,8 @@ struct FMDesktopIconViewDetails
/* For the desktop rescanning
*/
- guint delayed_init_signal;
- guint done_loading_signal;
+ gulong delayed_init_signal;
+ gulong done_loading_signal;
guint reload_desktop_timeout;
gboolean pending_rescan;
};
@@ -236,14 +237,13 @@ fm_desktop_icon_view_destroy (GtkObject *object)
}
if (icon_view->details->done_loading_signal != 0) {
- gtk_signal_disconnect (GTK_OBJECT (fm_directory_view_get_model
- (FM_DIRECTORY_VIEW (icon_view))),
- icon_view->details->done_loading_signal);
+ g_signal_handler_disconnect (fm_directory_view_get_model (FM_DIRECTORY_VIEW (icon_view)),
+ icon_view->details->done_loading_signal);
}
if (icon_view->details->delayed_init_signal != 0) {
- gtk_signal_disconnect (GTK_OBJECT (icon_view),
- icon_view->details->delayed_init_signal);
+ g_signal_handler_disconnect (icon_view,
+ icon_view->details->delayed_init_signal);
}
/* Delete all of the link files. */
@@ -303,7 +303,7 @@ fm_desktop_icon_view_handle_middle_click (NautilusIconContainer *icon_container,
/* Stop the event because we don't want anyone else dealing with it. */
gdk_flush ();
- gtk_signal_emit_stop_by_name (GTK_OBJECT(icon_container), "middle_click");
+ g_signal_stop_emission_by_name (icon_container, "middle_click");
/* build an X event to represent the middle click. */
x_event.type = ButtonPress;
@@ -539,8 +539,8 @@ delayed_init (FMDesktopIconView *desktop_icon_view)
desktop_icon_view->details->reload_desktop_timeout =
gtk_timeout_add (RESCAN_TIMEOUT, do_desktop_rescan, desktop_icon_view);
- gtk_signal_disconnect (GTK_OBJECT (desktop_icon_view),
- desktop_icon_view->details->delayed_init_signal);
+ g_signal_handler_disconnect (desktop_icon_view,
+ desktop_icon_view->details->delayed_init_signal);
desktop_icon_view->details->delayed_init_signal = 0;
}
@@ -569,8 +569,8 @@ fm_desktop_icon_view_init (FMDesktopIconView *desktop_icon_view)
* way to keep track of the items on the desktop.
*/
if (!nautilus_monitor_active ()) {
- desktop_icon_view->details->delayed_init_signal = gtk_signal_connect
- (GTK_OBJECT (desktop_icon_view), "begin_loading",
+ desktop_icon_view->details->delayed_init_signal = g_signal_connect
+ (desktop_icon_view, "begin_loading",
G_CALLBACK (delayed_init), desktop_icon_view);
}
@@ -624,23 +624,23 @@ fm_desktop_icon_view_init (FMDesktopIconView *desktop_icon_view)
G_CALLBACK (event_callback),
desktop_icon_view);
- gtk_signal_connect_while_alive (GTK_OBJECT (nautilus_trash_monitor_get ()),
+ eel_signal_connect_while_alive (G_OBJECT (nautilus_trash_monitor_get ()),
"trash_state_changed",
G_CALLBACK (fm_desktop_icon_view_trash_state_changed_callback),
desktop_icon_view,
- GTK_OBJECT (desktop_icon_view));
+ G_OBJECT (desktop_icon_view));
- gtk_signal_connect_while_alive (GTK_OBJECT (nautilus_volume_monitor_get ()),
+ eel_signal_connect_while_alive (G_OBJECT (nautilus_volume_monitor_get ()),
"volume_mounted",
G_CALLBACK (volume_mounted_callback),
desktop_icon_view,
- GTK_OBJECT (desktop_icon_view));
+ G_OBJECT (desktop_icon_view));
- gtk_signal_connect_while_alive (GTK_OBJECT (nautilus_volume_monitor_get ()),
+ eel_signal_connect_while_alive (G_OBJECT (nautilus_volume_monitor_get ()),
"volume_unmounted",
G_CALLBACK (volume_unmounted_callback),
desktop_icon_view,
- GTK_OBJECT (desktop_icon_view));
+ G_OBJECT (desktop_icon_view));
eel_preferences_add_callback (NAUTILUS_PREFERENCES_HOME_URI,
home_uri_changed,
@@ -1042,8 +1042,7 @@ desktop_icons_compare_callback (NautilusIconContainer *container,
/* We know the answer, so prevent the other handlers
* from overwriting our result.
*/
- gtk_signal_emit_stop_by_name (GTK_OBJECT (container),
- "compare_icons");
+ g_signal_stop_emission_by_name (container, "compare_icons");
if (category_a < category_b) {
return -1;
} else {
diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c
index c5324d5e6..2f67b341a 100644
--- a/src/file-manager/fm-properties-window.c
+++ b/src/file-manager/fm-properties-window.c
@@ -39,6 +39,7 @@
#include <eel/eel-vfs-extensions.h>
#include <eel/eel-viewport.h>
#include <eel/eel-wrap-table.h>
+#include <gtk/gtkalignment.h>
#include <gtk/gtkcheckbutton.h>
#include <gtk/gtkdnd.h>
#include <gtk/gtkentry.h>
@@ -49,7 +50,6 @@
#include <gtk/gtkmain.h>
#include <gtk/gtknotebook.h>
#include <gtk/gtkoptionmenu.h>
-#include <gtk/gtkpixmap.h>
#include <gtk/gtkscrolledwindow.h>
#include <gtk/gtksignal.h>
#include <gtk/gtktable.h>
diff --git a/src/file-manager/nautilus-indexing-info.c b/src/file-manager/nautilus-indexing-info.c
index 7bfe97615..3d9400bf6 100644
--- a/src/file-manager/nautilus-indexing-info.c
+++ b/src/file-manager/nautilus-indexing-info.c
@@ -96,9 +96,9 @@ update_progress_display (gpointer callback_data)
progress_change_data = (ProgressChangeData *) callback_data;
- progress_label = EEL_LABEL (progress_change_data->progress_label);
+ progress_label = GTK_LABEL (progress_change_data->progress_label);
progress_string = get_text_for_progress_label ();
- eel_label_set_text (progress_label, progress_string);
+ gtk_label_set_text (progress_label, progress_string);
g_free (progress_string);
gtk_progress_set_value (progress_change_data->progress_bar, get_index_percentage_complete ());
@@ -164,10 +164,9 @@ last_index_time_dialog_new (void)
time_str);
g_free (time_str);
- label = eel_label_new (label_str);
- eel_label_set_never_smooth (EEL_LABEL (label), TRUE);
- eel_label_set_justify (EEL_LABEL (label), GTK_JUSTIFY_LEFT);
- eel_label_make_bold (EEL_LABEL (label));
+ label = gtk_label_new (label_str);
+ gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
+ eel_gtk_label_make_bold (GTK_LABEL (label));
gtk_box_pack_start (GTK_BOX (dialog->vbox), label,
FALSE, FALSE, 0);
@@ -207,10 +206,8 @@ index_progress_dialog_new (void)
gtk_box_pack_start (GTK_BOX (embedded_vbox), indexing_progress_bar, FALSE, FALSE, 0);
progress_string = get_text_for_progress_label ();
- progress_label = eel_label_new (progress_string);
- eel_label_set_never_smooth (EEL_LABEL (progress_label), TRUE);
+ progress_label = gtk_label_new (progress_string);
g_free (progress_string);
- eel_label_set_justify (EEL_LABEL (progress_label), GTK_JUSTIFY_LEFT);
gtk_box_pack_start (GTK_BOX (embedded_vbox), progress_label, FALSE, FALSE, 0);
progress_bar_hbox = gtk_hbox_new (FALSE, 0);
@@ -222,7 +219,7 @@ index_progress_dialog_new (void)
/* Keep the dialog current with actual indexing progress */
progress_data = g_new (ProgressChangeData, 1);
- progress_data->progress_label = EEL_LABEL (progress_label);
+ progress_data->progress_label = GTK_LABEL (progress_label);
progress_data->progress_bar = GTK_PROGRESS (indexing_progress_bar);
timeout_id = gtk_timeout_add_full (PROGRESS_UPDATE_INTERVAL,
update_progress_display,
diff --git a/src/nautilus-about.c b/src/nautilus-about.c
index 738d9569a..185627ae6 100644
--- a/src/nautilus-about.c
+++ b/src/nautilus-about.c
@@ -209,9 +209,10 @@ nautilus_about_repaint (GtkWidget *widget,
/* utility routine to draw a string at a position */
static void
-draw_aa_string (GdkPixbuf *pixbuf,
- gboolean bold,
- int font_size,
+draw_aa_string (GtkWidget *widget,
+ GdkPixbuf *pixbuf,
+ PangoWeight weight,
+ double scale_factor,
int x_pos,
int y_pos,
guint32 color,
@@ -219,23 +220,19 @@ draw_aa_string (GdkPixbuf *pixbuf,
const char *text,
int shadow_offset)
{
+ PangoLayout *layout;
+
+ layout = pango_layout_new (eel_gtk_widget_get_pango_ft2_context (widget));
+ pango_layout_set_text (layout, text, -1);
+
if (shadow_offset != 0) {
-#if GNOME2_CONVERSION_COMPLETE
- eel_scalable_font_draw_text (font, pixbuf,
- x_pos + shadow_offset, y_pos + shadow_offset,
- eel_gdk_pixbuf_whole_pixbuf,
- font_size,
- text, strlen (text),
- shadow_color, EEL_OPACITY_FULLY_OPAQUE);
-#endif
+ eel_gdk_pixbuf_draw_layout (pixbuf, x_pos + shadow_offset, y_pos + shadow_offset,
+ shadow_color, layout);
}
-#if GNOME2_CONVERSION_COMPLETE
- eel_scalable_font_draw_text (font, pixbuf, x_pos, y_pos,
- eel_gdk_pixbuf_whole_pixbuf,
- font_size,
- text, strlen (text), color, EEL_OPACITY_FULLY_OPAQUE);
-#endif
+ eel_gdk_pixbuf_draw_layout (pixbuf, x_pos, y_pos, color, layout);
+
+ g_object_unref (layout);
}
/* randomize_authors randomizes the order array so different names get displayed in different positions each time */
@@ -283,7 +280,8 @@ draw_author_list (NautilusAbout *about,
xpos = AUTHOR_LEFT_POS; ypos = AUTHOR_TOP_POS;
while (about->details->authors[about->details->order_array[index]] != NULL) {
- draw_aa_string (pixbuf, FALSE, 12, xpos, ypos,
+ draw_aa_string (GTK_WIDGET (about), pixbuf,
+ PANGO_WEIGHT_NORMAL, PANGO_SCALE_MEDIUM, xpos, ypos,
EEL_RGB_COLOR_BLACK, EEL_RGB_COLOR_BLACK,
about->details->authors[about->details->order_array[index]],
0);
@@ -329,17 +327,17 @@ nautilus_about_draw_info (NautilusAbout *about,
/* draw the name and version */
display_str = g_strdup_printf ("%s %s", title, version);
- draw_aa_string (pixbuf, TRUE, 24, 12, 5, white, black, display_str, 1);
+ draw_aa_string (GTK_WIDGET (about), pixbuf, PANGO_WEIGHT_BOLD, PANGO_SCALE_X_LARGE, 12, 5, white, black, display_str, 1);
g_free (display_str);
/* draw the copyright notice */
- draw_aa_string (pixbuf, TRUE, 11, 12, 40, black, black, copyright, 0);
+ draw_aa_string (GTK_WIDGET (about), pixbuf, PANGO_WEIGHT_BOLD, PANGO_SCALE_MEDIUM, 12, 40, black, black, copyright, 0);
/* draw the authors title */
- draw_aa_string (pixbuf, TRUE, 20, 184, 64, black, black, _("Authors"), 0);
+ draw_aa_string (GTK_WIDGET (about), pixbuf, PANGO_WEIGHT_BOLD, PANGO_SCALE_LARGE, 184, 64, black, black, _("Authors"), 0);
/* draw the time stamp */
- draw_aa_string (pixbuf, FALSE, 11, 284, total_height - 14, grey, black, time_stamp, 0);
+ draw_aa_string (GTK_WIDGET (about), pixbuf, PANGO_WEIGHT_NORMAL, PANGO_SCALE_MEDIUM, 284, total_height - 14, grey, black, time_stamp, 0);
/* draw the translator's credit, if necessary */
if (eel_strcmp (translators, "Translator Credits") != 0) {
@@ -354,7 +352,7 @@ nautilus_about_draw_info (NautilusAbout *about,
index = 0;
while (comment_array[index] != NULL) {
- draw_aa_string (pixbuf, FALSE, 11, xpos, ypos, black, black, comment_array[index], 0);
+ draw_aa_string (GTK_WIDGET (about), pixbuf, PANGO_WEIGHT_NORMAL, PANGO_SCALE_MEDIUM, xpos, ypos, black, black, comment_array[index], 0);
ypos += 14;
index++;
}
@@ -377,7 +375,7 @@ nautilus_about_draw_info (NautilusAbout *about,
index = 0;
xpos = 6; ypos = 118;
while (comment_array[index] != NULL) {
- draw_aa_string (pixbuf, FALSE, 14, xpos, ypos, black, black, comment_array[index], 0);
+ draw_aa_string (GTK_WIDGET (about), pixbuf, PANGO_WEIGHT_NORMAL, PANGO_SCALE_LARGE, xpos, ypos, black, black, comment_array[index], 0);
ypos += 18;
index++;
}
diff --git a/src/nautilus-complex-search-bar.c b/src/nautilus-complex-search-bar.c
index b041e07d8..4cfa01daf 100644
--- a/src/nautilus-complex-search-bar.c
+++ b/src/nautilus-complex-search-bar.c
@@ -425,24 +425,7 @@ unattach_criterion_from_search_bar (NautilusComplexSearchBar *bar,
static GtkWidget *
load_find_them_pixmap_widget (void)
{
- GdkPixbuf *pixbuf;
- GdkPixmap *pixmap;
- GdkBitmap *mask;
- GtkWidget *widget;
-
- pixbuf = gdk_pixbuf_new_from_file (NAUTILUS_PIXMAPDIR "/search.png", NULL);
- if (pixbuf != NULL) {
- gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pixmap, &mask, EEL_STANDARD_ALPHA_THRESHHOLD);
- g_object_unref (pixbuf);
- widget = gtk_pixmap_new (pixmap, mask);
-
- gdk_pixmap_unref (pixmap);
- gdk_pixmap_unref (mask);
-
- return widget;
- } else {
- return NULL;
- }
+ return gtk_image_new_from_file (NAUTILUS_PIXMAPDIR "/search.png");
}
diff --git a/src/nautilus-information-panel.c b/src/nautilus-information-panel.c
index e87724c1e..61c458c03 100644
--- a/src/nautilus-information-panel.c
+++ b/src/nautilus-information-panel.c
@@ -39,6 +39,7 @@
#include <eel/eel-background.h>
#include <eel/eel-glib-extensions.h>
+#include <eel/eel-gobject-extensions.h>
#include <eel/eel-gtk-extensions.h>
#include <eel/eel-gtk-macros.h>
#include <eel/eel-stock-dialogs.h>
@@ -50,6 +51,7 @@
#include <gtk/gtkdnd.h>
#include <gtk/gtkhbox.h>
#include <gtk/gtknotebook.h>
+#include <gtk/gtksignal.h>
#include <libgnome/gnome-i18n.h>
#include <libgnomeui/gnome-uidefs.h>
#include <libgnomevfs/gnome-vfs-application-registry.h>
@@ -82,7 +84,7 @@ struct NautilusSidebarDetails {
gboolean has_buttons;
char *uri;
NautilusFile *file;
- guint file_changed_connection;
+ gulong file_changed_connection;
char *default_background_color;
char *default_background_image;
int selected_index;
@@ -332,8 +334,8 @@ nautilus_sidebar_finalize (GObject *object)
sidebar = NAUTILUS_SIDEBAR (object);
if (sidebar->details->file != NULL) {
- gtk_signal_disconnect (GTK_OBJECT (sidebar->details->file),
- sidebar->details->file_changed_connection);
+ g_signal_handler_disconnect (sidebar->details->file,
+ sidebar->details->file_changed_connection);
nautilus_file_monitor_remove (sidebar->details->file, sidebar);
nautilus_file_unref (sidebar->details->file);
}
@@ -1516,11 +1518,11 @@ nautilus_sidebar_update_buttons (NautilusSidebar *sidebar)
g_signal_connect (temp_button, "clicked",
G_CALLBACK (empty_trash_callback), NULL);
- gtk_signal_connect_while_alive (GTK_OBJECT (nautilus_trash_monitor_get ()),
- "trash_state_changed",
- G_CALLBACK (nautilus_sidebar_trash_state_changed_callback),
- temp_button,
- GTK_OBJECT (temp_button));
+ eel_signal_connect_while_alive (G_OBJECT (nautilus_trash_monitor_get ()),
+ "trash_state_changed",
+ G_CALLBACK (nautilus_sidebar_trash_state_changed_callback),
+ temp_button,
+ G_OBJECT (temp_button));
}
@@ -1652,8 +1654,8 @@ nautilus_sidebar_set_uri (NautilusSidebar *sidebar,
sidebar->details->uri = g_strdup (new_uri);
if (sidebar->details->file != NULL) {
- gtk_signal_disconnect (GTK_OBJECT (sidebar->details->file),
- sidebar->details->file_changed_connection);
+ g_signal_handler_disconnect (sidebar->details->file,
+ sidebar->details->file_changed_connection);
nautilus_file_monitor_remove (sidebar->details->file, sidebar);
}
diff --git a/src/nautilus-property-browser.c b/src/nautilus-property-browser.c
index 8081c18e4..cd17bad0a 100644
--- a/src/nautilus-property-browser.c
+++ b/src/nautilus-property-browser.c
@@ -59,6 +59,7 @@
#include <gtk/gtklabel.h>
#include <gtk/gtkscrolledwindow.h>
#include <gtk/gtkselection.h>
+#include <gtk/gtksignal.h>
#include <gtk/gtkstock.h>
#include <gtk/gtktable.h>
#include <gtk/gtktogglebutton.h>
@@ -323,10 +324,8 @@ nautilus_property_browser_init (GtkObject *object)
/* add the title label */
property_browser->details->title_label = gtk_label_new ("");
-#if GNOME2_CONVERSION_COMPLETE
- eel_label_make_larger (EEL_LABEL (property_browser->details->title_label), 4);
- eel_label_make_bold (EEL_LABEL (property_browser->details->title_label));
-#endif
+ eel_gtk_label_set_scale (GTK_LABEL (property_browser->details->title_label), PANGO_SCALE_X_LARGE);
+ eel_gtk_label_make_bold (GTK_LABEL (property_browser->details->title_label));
gtk_widget_show(property_browser->details->title_label);
gtk_box_pack_start (GTK_BOX(temp_hbox), property_browser->details->title_label, FALSE, FALSE, 8);
@@ -334,10 +333,8 @@ nautilus_property_browser_init (GtkObject *object)
/* add the help label */
property_browser->details->help_label = gtk_label_new ("");
gtk_widget_show(property_browser->details->help_label);
-#if GNOME2_CONVERSION_COMPLETE
- eel_label_make_smaller (EEL_LABEL (property_browser->details->help_label), 2);
-#endif
- gtk_box_pack_end (GTK_BOX(temp_hbox), property_browser->details->help_label, FALSE, FALSE, 8);
+ eel_gtk_label_set_scale (GTK_LABEL (property_browser->details->help_label), PANGO_SCALE_SMALL);
+ gtk_box_pack_end (GTK_BOX (temp_hbox), property_browser->details->help_label, FALSE, FALSE, 8);
/* add the bottom box to hold the command buttons */
temp_box = gtk_event_box_new();
@@ -362,7 +359,7 @@ nautilus_property_browser_init (GtkObject *object)
gtk_widget_show(temp_button);
gtk_box_pack_end (GTK_BOX(property_browser->details->bottom_box), temp_button, FALSE, FALSE, GNOME_PAD_SMALL);
- gtk_signal_connect(GTK_OBJECT (temp_button), "clicked", G_CALLBACK (done_button_callback), property_browser);
+ g_signal_connect(temp_button, "clicked", G_CALLBACK (done_button_callback), property_browser);
/* create the "add new" button */
property_browser->details->add_button = gtk_button_new ();
@@ -1479,8 +1476,6 @@ element_clicked_callback (GtkWidget *image_table,
GtkTargetList *target_list;
GdkDragContext *context;
GdkPixbuf *pixbuf;
- GdkPixmap *pixmap_for_dragged_file;
- GdkBitmap *mask_for_dragged_file;
int x_delta, y_delta;
const char *element_name;
EelArtIPoint scroll_offset;
@@ -1542,25 +1537,18 @@ element_clicked_callback (GtkWidget *image_table,
/* set the pixmap and mask for dragging */
if (pixbuf != NULL) {
- gdk_pixbuf_render_pixmap_and_mask
- (pixbuf,
- &pixmap_for_dragged_file,
- &mask_for_dragged_file,
- EEL_STANDARD_ALPHA_THRESHHOLD);
-
- g_object_unref (pixbuf);
- gtk_drag_set_icon_pixmap
+ gtk_drag_set_icon_pixbuf
(context,
- gtk_widget_get_colormap (GTK_WIDGET (property_browser)),
- pixmap_for_dragged_file,
- mask_for_dragged_file,
+ pixbuf,
x_delta, y_delta);
+ g_object_unref (pixbuf);
}
/* optionally (if the shift key is down) hide the property browser - it will later be destroyed when the drag ends */
property_browser->details->keep_around = (event->state & GDK_SHIFT_MASK) == 0;
- if (!property_browser->details->keep_around)
- gtk_widget_hide(GTK_WIDGET(property_browser));
+ if (! property_browser->details->keep_around) {
+ gtk_widget_hide (GTK_WIDGET (property_browser));
+ }
}
@@ -1606,7 +1594,7 @@ static GtkWidget *
labeled_image_new (const char *text,
GdkPixbuf *pixbuf,
const char *property_name,
- guint num_smaller)
+ double scale_factor)
{
GtkWidget *labeled_image;
@@ -1666,7 +1654,7 @@ make_properties_from_directories (NautilusPropertyBrowser *property_browser)
&object_label) == GNOME_VFS_OK) {
GtkWidget *property_image;
- property_image = labeled_image_new (object_label, object_pixbuf, object_name, 2);
+ property_image = labeled_image_new (object_label, object_pixbuf, object_name, PANGO_SCALE_LARGE);
if (property_browser->details->category_type == NAUTILUS_PROPERTY_EMBLEM) {
char *keyword;
@@ -1759,7 +1747,7 @@ add_reset_property (NautilusPropertyBrowser *property_browser)
g_free (reset_image_file_name);
- reset_image = labeled_image_new (NULL, reset_chit, RESET_IMAGE_NAME, 0);
+ reset_image = labeled_image_new (NULL, reset_chit, RESET_IMAGE_NAME, PANGO_SCALE_MEDIUM);
gtk_container_add (GTK_CONTAINER (property_browser->details->content_table), reset_image);
eel_wrap_table_reorder_child (EEL_WRAP_TABLE (property_browser->details->content_table),
reset_image,
@@ -1811,7 +1799,7 @@ make_properties_from_xml_node (NautilusPropertyBrowser *property_browser,
pixbuf = make_color_drag_image (property_browser, color, FALSE);
/* make the tile from the pixmap and name */
- new_property = labeled_image_new (name, pixbuf, color, 2);
+ new_property = labeled_image_new (name, pixbuf, color, PANGO_SCALE_LARGE);
gtk_container_add (GTK_CONTAINER (property_browser->details->content_table), new_property);
gtk_widget_show (new_property);
diff --git a/src/nautilus-sidebar-title.c b/src/nautilus-sidebar-title.c
index 585f8c959..fb30df025 100644
--- a/src/nautilus-sidebar-title.c
+++ b/src/nautilus-sidebar-title.c
@@ -42,7 +42,6 @@
#include <eel/eel-string.h>
#include <gtk/gtkhbox.h>
#include <gtk/gtklabel.h>
-#include <gtk/gtkpixmap.h>
#include <gtk/gtksignal.h>
#include <gtk/gtkwidget.h>
#include <libgnome/gnome-i18n.h>
@@ -136,29 +135,6 @@ realize_callback (NautilusSidebarTitle *sidebar_title)
GTK_OBJECT (sidebar_title));
}
-static void
-smooth_font_changed_callback (gpointer callback_data)
-{
-#if GNOME2_CONVERSION_COMPLETE
- EelScalableFont *new_font;
- EelScalableFont *new_bold_font;
- NautilusSidebarTitle *sidebar_title;
-
- g_return_if_fail (NAUTILUS_IS_SIDEBAR_TITLE (callback_data));
-
- sidebar_title = NAUTILUS_SIDEBAR_TITLE (callback_data);
-
- new_font = nautilus_global_preferences_get_default_smooth_font ();
- new_bold_font = nautilus_global_preferences_get_default_smooth_bold_font ();
-
- eel_label_set_smooth_font (EEL_LABEL (sidebar_title->details->title_label), new_bold_font);
- eel_label_set_smooth_font (EEL_LABEL (sidebar_title->details->more_info_label), new_font);
-
- g_object_unref (new_font);
- g_object_unref (new_bold_font);
-#endif
-}
-
#if GNOME2_CONVERSION_COMPLETE
static GdkFont *
@@ -239,10 +215,6 @@ nautilus_sidebar_title_init (NautilusSidebarTitle *sidebar_title)
sidebar_title,
G_OBJECT (sidebar_title));
#endif
- eel_preferences_add_callback_while_alive (NAUTILUS_PREFERENCES_DEFAULT_SMOOTH_FONT,
- smooth_font_changed_callback,
- sidebar_title,
- G_OBJECT (sidebar_title));
eel_preferences_add_callback_while_alive (NAUTILUS_PREFERENCES_THEME,
nautilus_sidebar_title_theme_changed,
sidebar_title,
@@ -250,7 +222,6 @@ nautilus_sidebar_title_init (NautilusSidebarTitle *sidebar_title)
/* initialize the label colors & fonts */
nautilus_sidebar_title_theme_changed (sidebar_title);
- smooth_font_changed_callback (sidebar_title);
#if GNOME2_CONVERSION_COMPLETE
non_smooth_font_changed_callback (sidebar_title);
#endif
@@ -395,24 +366,20 @@ nautilus_sidebar_title_select_text_color (NautilusSidebarTitle *sidebar_title)
}
}
+ eel_gtk_widget_set_foreground_color (sidebar_title->details->title_label,
+ sidebar_title_color);
+ eel_gtk_widget_set_foreground_color (sidebar_title->details->more_info_label,
+ sidebar_info_title_color);
+
#if GNOME2_CONVERSION_COMPLETE
- eel_label_set_text_color (EEL_LABEL (sidebar_title->details->title_label),
- eel_parse_rgb_with_white_default (sidebar_title_color));
-
eel_label_set_smooth_drop_shadow_color (EEL_LABEL (sidebar_title->details->title_label),
- eel_parse_rgb_with_white_default (sidebar_title_shadow_color));
-
- eel_label_set_smooth_drop_shadow_offset (EEL_LABEL (sidebar_title->details->title_label),
- sidebar_title->details->shadow_offset);
-
- eel_label_set_text_color (EEL_LABEL (sidebar_title->details->more_info_label),
- eel_parse_rgb_with_white_default (sidebar_info_title_color));
-
+ eel_parse_rgb_with_white_default (sidebar_title_shadow_color));
eel_label_set_smooth_drop_shadow_color (EEL_LABEL (sidebar_title->details->more_info_label),
- eel_parse_rgb_with_white_default (sidebar_title_shadow_color));
-
+ eel_parse_rgb_with_white_default (sidebar_title_shadow_color));
+ eel_label_set_smooth_drop_shadow_offset (EEL_LABEL (sidebar_title->details->title_label),
+ sidebar_title->details->shadow_offset);
eel_label_set_smooth_drop_shadow_offset (EEL_LABEL (sidebar_title->details->more_info_label),
- sidebar_title->details->shadow_offset);
+ sidebar_title->details->shadow_offset);
#endif
g_free (sidebar_title_color);
@@ -590,22 +557,27 @@ update_title_font (NautilusSidebarTitle *sidebar_title)
gdk_font_unref (largest_fitting_font);
gdk_font_unref (bold_template_font);
gdk_font_unref (template_font);
+#else
+ eel_gtk_label_make_bold (GTK_LABEL (sidebar_title->details->title_label));
+ eel_gtk_label_set_scale (GTK_LABEL (sidebar_title->details->title_label), PANGO_SCALE_LARGE);
#endif
}
static void
update_title (NautilusSidebarTitle *sidebar_title)
{
+ GtkLabel *label;
+ const char *text;
+
+ label = GTK_LABEL (sidebar_title->details->title_label);
+ text = sidebar_title->details->title_text;
+
/* FIXME bugzilla.gnome.org 42500: We could defer showing the title until the icon is ready. */
-#ifdef GNOME2_CONVERSION_COMPLETE
- if (eel_label_set_text (EEL_LABEL (sidebar_title->details->title_label),
- sidebar_title->details->title_text)) {
- update_title_font (sidebar_title);
+ if (eel_strcmp (text, gtk_label_get_text (label)) == 0) {
+ return;
}
-#else
- gtk_label_set_text (GTK_LABEL (sidebar_title->details->title_label),
- sidebar_title->details->title_text);
-#endif
+ gtk_label_set_text (label, text);
+ update_title_font (sidebar_title);
}
static void
@@ -703,13 +675,8 @@ update_more_info (NautilusSidebarTitle *sidebar_title)
}
}
}
-#if GNOME2_CONVERSION_COMPLETE
- eel_label_set_text (EEL_LABEL (sidebar_title->details->more_info_label),
- info_string->str);
-#else
gtk_label_set_text (GTK_LABEL (sidebar_title->details->more_info_label),
info_string->str);
-#endif
g_string_free (info_string, TRUE);
}
@@ -886,16 +853,10 @@ sidebar_title_create_title_label (void)
{
GtkWidget *title_label;
-#if GNOME2_CONVERSION_COMPLETE
- title_label = eel_label_new_with_background ("");
- eel_label_make_bold (EEL_LABEL (title_label));
- eel_label_set_wrap (EEL_LABEL (title_label), TRUE);
- eel_label_set_justify (EEL_LABEL (title_label), GTK_JUSTIFY_CENTER);
-#else
title_label = gtk_label_new ("");
+ eel_gtk_label_make_bold (GTK_LABEL (title_label));
gtk_label_set_line_wrap (GTK_LABEL (title_label), TRUE);
gtk_label_set_justify (GTK_LABEL (title_label), GTK_JUSTIFY_CENTER);
-#endif
return title_label;
}
@@ -905,14 +866,9 @@ sidebar_title_create_more_info_label (void)
{
GtkWidget *more_info_label;
-#if GNOME2_CONVERSION_COMPLETE
- more_info_label = eel_label_new_with_background ("");
- eel_label_make_smaller (EEL_LABEL (more_info_label), 2);
- eel_label_set_justify (EEL_LABEL (more_info_label), GTK_JUSTIFY_CENTER);
-#else
more_info_label = gtk_label_new ("");
+ eel_gtk_label_set_scale (GTK_LABEL (more_info_label), PANGO_SCALE_SMALL);
gtk_label_set_justify (GTK_LABEL (more_info_label), GTK_JUSTIFY_CENTER);
-#endif
return more_info_label;
}
diff --git a/src/nautilus-sidebar.c b/src/nautilus-sidebar.c
index e87724c1e..61c458c03 100644
--- a/src/nautilus-sidebar.c
+++ b/src/nautilus-sidebar.c
@@ -39,6 +39,7 @@
#include <eel/eel-background.h>
#include <eel/eel-glib-extensions.h>
+#include <eel/eel-gobject-extensions.h>
#include <eel/eel-gtk-extensions.h>
#include <eel/eel-gtk-macros.h>
#include <eel/eel-stock-dialogs.h>
@@ -50,6 +51,7 @@
#include <gtk/gtkdnd.h>
#include <gtk/gtkhbox.h>
#include <gtk/gtknotebook.h>
+#include <gtk/gtksignal.h>
#include <libgnome/gnome-i18n.h>
#include <libgnomeui/gnome-uidefs.h>
#include <libgnomevfs/gnome-vfs-application-registry.h>
@@ -82,7 +84,7 @@ struct NautilusSidebarDetails {
gboolean has_buttons;
char *uri;
NautilusFile *file;
- guint file_changed_connection;
+ gulong file_changed_connection;
char *default_background_color;
char *default_background_image;
int selected_index;
@@ -332,8 +334,8 @@ nautilus_sidebar_finalize (GObject *object)
sidebar = NAUTILUS_SIDEBAR (object);
if (sidebar->details->file != NULL) {
- gtk_signal_disconnect (GTK_OBJECT (sidebar->details->file),
- sidebar->details->file_changed_connection);
+ g_signal_handler_disconnect (sidebar->details->file,
+ sidebar->details->file_changed_connection);
nautilus_file_monitor_remove (sidebar->details->file, sidebar);
nautilus_file_unref (sidebar->details->file);
}
@@ -1516,11 +1518,11 @@ nautilus_sidebar_update_buttons (NautilusSidebar *sidebar)
g_signal_connect (temp_button, "clicked",
G_CALLBACK (empty_trash_callback), NULL);
- gtk_signal_connect_while_alive (GTK_OBJECT (nautilus_trash_monitor_get ()),
- "trash_state_changed",
- G_CALLBACK (nautilus_sidebar_trash_state_changed_callback),
- temp_button,
- GTK_OBJECT (temp_button));
+ eel_signal_connect_while_alive (G_OBJECT (nautilus_trash_monitor_get ()),
+ "trash_state_changed",
+ G_CALLBACK (nautilus_sidebar_trash_state_changed_callback),
+ temp_button,
+ G_OBJECT (temp_button));
}
@@ -1652,8 +1654,8 @@ nautilus_sidebar_set_uri (NautilusSidebar *sidebar,
sidebar->details->uri = g_strdup (new_uri);
if (sidebar->details->file != NULL) {
- gtk_signal_disconnect (GTK_OBJECT (sidebar->details->file),
- sidebar->details->file_changed_connection);
+ g_signal_handler_disconnect (sidebar->details->file,
+ sidebar->details->file_changed_connection);
nautilus_file_monitor_remove (sidebar->details->file, sidebar);
}
diff --git a/src/nautilus-zoom-control.c b/src/nautilus-zoom-control.c
index c4894c7b2..78bcf8e73 100644
--- a/src/nautilus-zoom-control.c
+++ b/src/nautilus-zoom-control.c
@@ -37,7 +37,6 @@
#include <gtk/gtkmenu.h>
#include <gtk/gtkmenuitem.h>
#include <libgnome/gnome-util.h>
-#include <libgnomeui/gnome-pixmap.h>
#include <eel/eel-graphic-effects.h>
#include <eel/eel-gtk-macros.h>
#include <eel/eel-gtk-extensions.h>