diff options
author | Darin Adler <darin@src.gnome.org> | 2002-01-08 22:37:57 +0000 |
---|---|---|
committer | Darin Adler <darin@src.gnome.org> | 2002-01-08 22:37:57 +0000 |
commit | 2bab818c8682513cb9f7dc6d88b9644ebea0a8f5 (patch) | |
tree | e6ec9a4386de36ca8362f8ee81c827d978d04cb2 /src | |
parent | b790895feafbf897418b5f318595b0849a9c3fe7 (diff) | |
download | nautilus-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.
Diffstat (limited to 'src')
-rw-r--r-- | src/file-manager/fm-desktop-icon-view.c | 39 | ||||
-rw-r--r-- | src/file-manager/fm-properties-window.c | 2 | ||||
-rw-r--r-- | src/file-manager/nautilus-indexing-info.c | 17 | ||||
-rw-r--r-- | src/nautilus-about.c | 46 | ||||
-rw-r--r-- | src/nautilus-complex-search-bar.c | 19 | ||||
-rw-r--r-- | src/nautilus-information-panel.c | 22 | ||||
-rw-r--r-- | src/nautilus-property-browser.c | 44 | ||||
-rw-r--r-- | src/nautilus-sidebar-title.c | 94 | ||||
-rw-r--r-- | src/nautilus-sidebar.c | 22 | ||||
-rw-r--r-- | src/nautilus-zoom-control.c | 1 |
10 files changed, 115 insertions, 191 deletions
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> |