diff options
-rw-r--r-- | ChangeLog | 57 | ||||
-rw-r--r-- | TODO | 14 | ||||
-rw-r--r-- | components/hardware/nautilus-hardware-view.c | 2 | ||||
-rw-r--r-- | data/browser.xml | 60 | ||||
-rw-r--r-- | icons/crux_eggplant/crux_eggplant.xml | 8 | ||||
-rw-r--r-- | icons/crux_teal/crux_teal.xml | 8 | ||||
-rw-r--r-- | icons/default.xml | 16 | ||||
-rw-r--r-- | icons/gnome/gnome.xml | 14 | ||||
-rw-r--r-- | icons/sierra/sierra.xml | 6 | ||||
-rw-r--r-- | icons/tahoe/tahoe.xml | 6 | ||||
-rw-r--r-- | libnautilus-private/.cvsignore | 2 | ||||
-rw-r--r-- | libnautilus-private/nautilus-directory-async.c | 19 | ||||
-rw-r--r-- | libnautilus-private/nautilus-directory-background.c | 4 | ||||
-rw-r--r-- | libnautilus-private/nautilus-icon-container.c | 2 | ||||
-rw-r--r-- | libnautilus-private/nautilus-icon-text-item.c | 2 | ||||
-rw-r--r-- | src/file-manager/fm-directory-view.c | 3 | ||||
-rw-r--r-- | src/nautilus-about.c | 105 | ||||
-rw-r--r-- | src/nautilus-bookmarks-window.c | 214 | ||||
-rw-r--r-- | src/nautilus-information-panel.c | 4 | ||||
-rw-r--r-- | src/nautilus-main.c | 2 | ||||
-rw-r--r-- | src/nautilus-property-browser.c | 12 | ||||
-rw-r--r-- | src/nautilus-sidebar-tabs.c | 16 | ||||
-rw-r--r-- | src/nautilus-sidebar-title.c | 14 | ||||
-rw-r--r-- | src/nautilus-sidebar.c | 4 |
24 files changed, 321 insertions, 273 deletions
@@ -1,3 +1,58 @@ +2001-11-30 Darin Adler <darin@bentspoon.com> + + * libnautilus-private/nautilus-directory-async.c: + (top_left_read_callback): Roll double-free bug fix from the branch. + + * TODO: Some small updates. + + * components/hardware/nautilus-hardware-view.c: + * data/browser.xml: + * icons/crux_eggplant/crux_eggplant.xml: + * icons/crux_teal/crux_teal.xml: + * icons/default.xml: + * icons/gnome/gnome.xml: + * icons/sierra/sierra.xml: + * icons/tahoe/tahoe.xml: + * libnautilus-private/nautilus-directory-background.c: + (nautilus_file_background_write_desktop_settings): + * libnautilus-private/nautilus-icon-container.c: + (start_rubberbanding): + * libnautilus-private/nautilus-icon-text-item.c: + (fetch_themed_color): + * src/nautilus-property-browser.c: (add_color_to_browser): + * src/nautilus-sidebar-tabs.c: (setup_light_text), + (setup_dark_text), (nautilus_sidebar_tabs_init), + (nautilus_sidebar_tabs_receive_dropped_color): + * src/nautilus-sidebar-title.c: + (nautilus_sidebar_title_select_text_color): + * src/nautilus-sidebar.c: (receive_dropped_color): + Changed all rgb:RRRR/GGGG/BBBB to #RRGGBB. We still probably have + to handle the old format just for old data files. + + * libnautilus-private/.cvsignore: + nautilus-marshal-guts.h -> nautilus-marshal.h + + * src/file-manager/fm-directory-view.c: + (update_directory_in_scripts_menu): Add filter so that we don't + see invisible or backup files in the scripts menu. In the old + days, gnome-vfs supplied the filtering. + + * src/nautilus-about.c: (nautilus_about_finalize), + (nautilus_about_instance_init), (nautilus_about_hide), + (nautilus_about_hide_on_response), + (nautilus_about_hide_on_delete), (nautilus_about_class_init): + Get rid of double-destroy problem with about, and fix OK button. + + * src/nautilus-bookmarks-window.c: + (nautilus_bookmarks_window_response_callback): Fix Done button. + (create_bookmarks_window): Hook up response callback. + (on_window_delete_event), (handle_close_accelerator): Get rid of + save_geometry_and_hide, since hide already does that. + + * src/nautilus-main.c: (main): Add some missing domains for better + debugging. We should figure out a way to do this without a list of + domains. + 2001-11-27 Seth Nickell <snickell@stanford.edu> * nautilus-help.desktop.in: @@ -192,6 +247,7 @@ Tue Nov 20 21:45:43 2001 Owen Taylor <otaylor@redhat.com> CORBA_OBJECT_NIL return from get_control_frame. 2001-11-12 Thomas Canty <tommydal@optushome.com.au> + * configure.in: Initialise the gnome-vfs-module package, which is required for the help component @@ -223,7 +279,6 @@ Tue Nov 20 21:45:43 2001 Owen Taylor <otaylor@redhat.com> * src/nautilus-window-toolbars.c: Re-enable the throbber. - 2001-11-10 Benedikt Roth <Benedikt.Roth@gmx.net> @@ -1,12 +1,16 @@ For tasks outside the porting effort, we track them as bugs in http://bugzilla.gnome.org. -Porting tasks. Some are necessary and some are just cleanup. - -- Get EelLabel working and switch back to it on the sidebar. -- Get rid of all the direct freetype use and switch to using - Pango instead. +- Make closing a window work (Bonobo fix needed). +- Get embedded controls working (back and forward buttons and throbber). +- Get list view working. - Visit all the destroy and move things into finalize or dispose and make them callable twice as appropriate. - Change things that use destroy handlers to use weak references instead. +- Figure out why we get NULL font problems in Pango when the progress + dialog comes up. + +- Get EelLabel working and switch back to it on the sidebar. +- Get rid of all the direct freetype use and switch to using + Pango instead. diff --git a/components/hardware/nautilus-hardware-view.c b/components/hardware/nautilus-hardware-view.c index 00964206d..e40155221 100644 --- a/components/hardware/nautilus-hardware-view.c +++ b/components/hardware/nautilus-hardware-view.c @@ -97,7 +97,7 @@ static int update_uptime_text (gpointer callback_data); EEL_CLASS_BOILERPLATE (NautilusHardwareView, nautilus_hardware_view, GTK_TYPE_EVENT_BOX) -#define HARDWARE_DEFAULT_BACKGROUND_COLOR "rgb:DDDD/DDDD/BBBB" +#define HARDWARE_DEFAULT_BACKGROUND_COLOR "#DDDDBB" static void nautilus_hardware_view_class_init (NautilusHardwareViewClass *klass) diff --git a/data/browser.xml b/data/browser.xml index 4b8c165f4..f2c77256e 100644 --- a/data/browser.xml +++ b/data/browser.xml @@ -35,36 +35,36 @@ </category> <category name="colors" _display_name="Colors" image="colors.png" columns="5" mode="inline" type="application/x-color" _description="Drag a color to an object to change it to that color"> - <color _name="Mango">rgb:E0E0/D6D6/5656</color> - <color _name="Orange">rgb:D2D2/ABAB/5050</color> - <color _name="Tangerine">rgb:C6C6/8686/4B4B</color> - <color _name="Grapefruit">rgb:BBBB/6262/4747</color> - <color _name="Ruby">rgb:ADAD/3838/4141</color> - <color _name="Pale Blue">rgb:5B5B/A7A7/CFCF</color> - <color _name="Sky">rgb:3939/7878/A7A7</color> - <color _name="Danube">rgb:1818/4A4A/7FF</color> - <color _name="Indigo">rgb:3E3E/4949/8585</color> - <color _name="Violet">rgb:6565/4949/8C8C</color> - <color _name="Sea Foam">rgb:CCCC/FFFF/CCCC</color> - <color _name="Leaf">rgb:6666/CCCC/6666</color> - <color _name="Deep Teal">rgb:4545/7272/6363</color> - <color _name="Dark Cork">rgb:6363/6565/4A4A</color> - <color _name="Mud">rgb:8080/5959/3232</color> - <color _name="Fire Engine">rgb:E5E5/3B3B/1A1A</color> - <color _name="Envy">rgb:2C2C/8282/1E1E</color> - <color _name="Azul">rgb:1818/2222/CACA</color> - <color _name="Lemon">rgb:F6F6/E1E1/1818</color> - <color _name="Bubble Gum">rgb:D0D0/5050/A4A4</color> - <color _name="White">rgb:FFFF/FFFF/FFFF</color> - <color _name="Apparition">rgb:E5E5/E5E5/E5E5</color> - <color _name="Silver">rgb:C9C9/C9C9/C9C9</color> - <color _name="Concrete">rgb:AFAF/AFAF/AFAF</color> - <color _name="Shale">rgb:7474/7474/7474</color> - <color _name="Granite">rgb:6F6F/6F6F/6F6F</color> - <color _name="Eclipse">rgb:5252/5252/5252</color> - <color _name="Charcoal">rgb:3232/3232/3232</color> - <color _name="Onyx">rgb:2222/2222/2222</color> - <color _name="Black">rgb:0000/0000/0000</color> + <color _name="Mango">#E0D656</color> + <color _name="Orange">#D2AB50</color> + <color _name="Tangerine">#C6864B</color> + <color _name="Grapefruit">#BB6247</color> + <color _name="Ruby">#AD3841</color> + <color _name="Pale Blue">#5BA7CF</color> + <color _name="Sky">#3978A7</color> + <color _name="Danube">#184AFF</color> + <color _name="Indigo">#3E4985</color> + <color _name="Violet">#65498C</color> + <color _name="Sea Foam">#CCFFCC</color> + <color _name="Leaf">#66CC66</color> + <color _name="Deep Teal">#457263</color> + <color _name="Dark Cork">#63654A</color> + <color _name="Mud">#805932</color> + <color _name="Fire Engine">#E53B1A</color> + <color _name="Envy">#2C821E</color> + <color _name="Azul">#1822CA</color> + <color _name="Lemon">#F6E118</color> + <color _name="Bubble Gum">#D050A4</color> + <color _name="White">#FFFFFF</color> + <color _name="Apparition">#E5E5E5</color> + <color _name="Silver">#C9C9C9</color> + <color _name="Concrete">#AFAFAF</color> + <color _name="Shale">#747474</color> + <color _name="Granite">#6F6F6F</color> + <color _name="Eclipse">#525252</color> + <color _name="Charcoal">#323232</color> + <color _name="Onyx">#222222</color> + <color _name="Black">#000000</color> </category> <category name="emblems" _display_name="Emblems" image="emblems.png" columns="6" mode="directory" path="nautilus/emblems" type="property/keyword" _description="Drag an emblem to an object to add it to the object"> diff --git a/icons/crux_eggplant/crux_eggplant.xml b/icons/crux_eggplant/crux_eggplant.xml index f8b343043..f192815e1 100644 --- a/icons/crux_eggplant/crux_eggplant.xml +++ b/icons/crux_eggplant/crux_eggplant.xml @@ -4,14 +4,14 @@ dark_info_color="0x777777" light_info_color="0xAAAAAA" selection_box_color_rgba="0x71577440" - selection_box_color="rgb:7171/5757/7474" - background_color="rgb:F0F0/F0F0/F0F0"/> + selection_box_color="#715774" + background_color="#F0F0F0"/> - <sidebar sidebar_background_color="rgb:8888/6F6F/8D8D-rgb:2525/0C0C/2A2A%90-rgb:0000/0000/0000:h" + <sidebar sidebar_background_color="#886F8D-#250C2A%90-#000000:h" sidebar_background_tile_image="patterns/.striated.png" tab_piece_images="sidebar_tab_pieces" combine="true" left_offset="0" shadow_offset="1" text_h_offset="-4" - label_color="rgb:FFFF/FFFF/FFFF" + label_color="#FFFFFF" tab_font="-*-helvetica-bold-r-normal-*-24-*-*-*-*-*-*-*" /> <desktop background_tile_image="./backgrounds/background_pattern.png"/> diff --git a/icons/crux_teal/crux_teal.xml b/icons/crux_teal/crux_teal.xml index 31e409a98..e3fc1d51f 100644 --- a/icons/crux_teal/crux_teal.xml +++ b/icons/crux_teal/crux_teal.xml @@ -3,13 +3,13 @@ <directory background_tile_image="./backgrounds/window_pattern.png" dark_info_color="0x777777" light_info_color="0xAAAAAA" selection_box_color_rgba="0x497B7E40" - selection_box_color="rgb:4949/7B7B/7E7E" - background_color="rgb:F0F0/F0F0/F0F0"/> + selection_box_color="#497B7E" + background_color="#F0F0F0"/> - <sidebar sidebar_background_color="rgb:6666/9999/9999-rgb:0000/3333/3333%90-rgb:0000/0000/0000:h" + <sidebar sidebar_background_color="#669999-#003333%90-#000000:h" sidebar_background_tile_image="patterns/.striated.png" tab_piece_images="sidebar_tab_pieces" combine="true" - left_offset="0" shadow_offset="1" text_h_offset="-4" label_color="rgb:FFFF/FFFF/FFFF" + left_offset="0" shadow_offset="1" text_h_offset="-4" label_color="#FFFFFF" tab_font="-*-helvetica-bold-r-normal-*-24-*-*-*-*-*-*-*" /> <desktop background_tile_image="./backgrounds/background_pattern.png" /> diff --git a/icons/default.xml b/icons/default.xml index c5e242a2a..66ff6f42c 100644 --- a/icons/default.xml +++ b/icons/default.xml @@ -3,20 +3,20 @@ <theme _name="Default" _description="This is the default theme for Nautilus."> <sidebar sidebar_background_tile_image="./side_bar_image.png" - sidebar_background_color="rgb:4747/4A4A/7C7C-rgb:2222/2323/3A3A:h" + sidebar_background_color="#474A7C-#22233A:h" tab_piece_images="sidebar_tab_pieces" combine="true" - left_offset="0" shadow_offset="1" text_h_offset="-4" label_color="rgb:FFFF/FFFF/FFFF" + left_offset="0" shadow_offset="1" text_h_offset="-4" label_color="#FFFFFF" tab_font="-*-helvetica-bold-r-normal-*-24-*-*-*-*-*-*-*" /> - <desktop background_tile_image="patterns/brushed_metal.png" background_color="rgb:F0F0/F0F0/F0F0"/> + <desktop background_tile_image="patterns/brushed_metal.png" background_color="#F0F0F0"/> - <directory background_color="rgb:F0F0/F0F0/F0F0" + <directory background_color="#F0F0F0" selection_box_color_rgba="0x727D974C" - selection_box_color="rgb:7222/7DDD/9777"/> + selection_box_color="#727D97"/> - <icon highlight_background_color="rgb:0000/0000/0000" - highlight_text_color="rgb:FFFF/FFFF/FFFF" - text_fill_color="rgb:FFFF/FFFF/FFFF"/> + <icon highlight_background_color="#000000" + highlight_text_color="#FFFFFF" + text_fill_color="#FFFFFF"/> <thumbnails frame_offsets="3,3,6,6"/> diff --git a/icons/gnome/gnome.xml b/icons/gnome/gnome.xml index a804c1675..75e6d252b 100644 --- a/icons/gnome/gnome.xml +++ b/icons/gnome/gnome.xml @@ -3,21 +3,21 @@ <directory background_tile_image="patterns/gnome.jpg" selection_box_color_rgba="0x00441140" - selection_box_color="rgb:8d00/8100/7300"/> + selection_box_color="#8d8173"/> - <sidebar sidebar_background_color="rgb:8d00/8100/7300-rgb:3f00/3700/2e00%80-rgb:0000/0000/0000:h" + <sidebar sidebar_background_color="#8d8173-#3f372e%80-#000000:h" sidebar_background_tile_image="patterns/.striated.png" tab_piece_images="sidebar_tab_pieces" combine="true" left_offset="0" shadow_offset="1" text_h_offset="-4" - label_color="rgb:FFFF/FFFF/FFFF" + label_color="#FFFFFF" tab_font="-*-helvetica-bold-r-normal-*-24-*-*-*-*-*-*-*" /> <desktop background_tile_image="patterns/dark-gnome.jpg" - background_color="rgb:F400/F200/e800"/> + background_color="#:F400/F200/e800"/> - <icon highlight_background_color="rgb:0000/0000/0000" - highlight_text_color="rgb:FFFF/FFFF/FFFF" - text_fill_color="rgb:FFFF/FFFF/FFFF"/> + <icon highlight_background_color="#000000" + highlight_text_color="#FFFFFF" + text_fill_color="#FFFFFF"/> <thumbnails frame_offsets="3,3,6,6"/> <toolbar icon_theme="standard"/> diff --git a/icons/sierra/sierra.xml b/icons/sierra/sierra.xml index 9615091dd..aaca7b95d 100644 --- a/icons/sierra/sierra.xml +++ b/icons/sierra/sierra.xml @@ -1,7 +1,7 @@ <?xml version="1.0"?> <theme _name="Sierra" _description="Uses manila folders and gray-green backgrounds."> - <sidebar sidebar_background_tile_image="./green_weave.png" sidebar_background_color="rgb:FFFF/FFFF/FFFF" tab_piece_images="none"/> - <directory background_tile_image="./villanova_green.png" background_color="rgb:FFFF/FFFF/FFFF" selection_box_color_rgba="0x70818359" selection_box_color="rgb:7000/8111/8333"/> - <desktop background_tile_image="./Sierra_desktop.png" background_color="rgb:FFFF/FFFF/FFFF"/> + <sidebar sidebar_background_tile_image="./green_weave.png" sidebar_background_color="#FFFFFF" tab_piece_images="none"/> + <directory background_tile_image="./villanova_green.png" background_color="#FFFFFF" selection_box_color_rgba="0x70818359" selection_box_color="#708183"/> + <desktop background_tile_image="./Sierra_desktop.png" background_color="#FFFFFF"/> <zoom_control number_v_offset="-6" digit_width="6"/> </theme> diff --git a/icons/tahoe/tahoe.xml b/icons/tahoe/tahoe.xml index 167e34c0b..8bea978eb 100644 --- a/icons/tahoe/tahoe.xml +++ b/icons/tahoe/tahoe.xml @@ -1,7 +1,7 @@ <?xml version="1.0"?> <theme _name="Tahoe" _description="This theme uses photo-realistic folders."> - <sidebar sidebar_background_tile_image="./bluewall.png" sidebar_background_color="rgb:FFFF/FFFF/FFFF" title_color="rgb:0000/0000/0000" title_shadow_color="rgb:BBBB/BBBB/BBBB" title_info_color="rgb:0000/0000/0000"/> - <directory background_tile_image="./blueridge.png" background_color="rgb:FFFF/FFFF/FFFF"/> - <desktop background_tile_image="patterns/fleur_de_lis.png" background_color="rgb:FFFF/FFFF/FFFF"/> + <sidebar sidebar_background_tile_image="./bluewall.png" sidebar_background_color="#FFFFFF" title_color="#000000" title_shadow_color="#BBBBBB" title_info_color="#000000"/> + <directory background_tile_image="./blueridge.png" background_color="#FFFFFF"/> + <desktop background_tile_image="patterns/fleur_de_lis.png" background_color="#FFFFFF"/> <zoom_control number_v_offset="-6" digit_width="6"/> </theme> diff --git a/libnautilus-private/.cvsignore b/libnautilus-private/.cvsignore index d35856bf6..bd4801a80 100644 --- a/libnautilus-private/.cvsignore +++ b/libnautilus-private/.cvsignore @@ -10,4 +10,4 @@ nautilus-metafile-server-stubs.c nautilus-metafile-server.h nautilus_metafile_server_idl_stamp nautilus-marshal-guts.c -nautilus-marshal-guts.h +nautilus-marshal.h diff --git a/libnautilus-private/nautilus-directory-async.c b/libnautilus-private/nautilus-directory-async.c index 2baa95adc..84b8e6630 100644 --- a/libnautilus-private/nautilus-directory-async.c +++ b/libnautilus-private/nautilus-directory-async.c @@ -2456,23 +2456,22 @@ top_left_read_callback (GnomeVFSResult result, gpointer callback_data) { NautilusDirectory *directory; - NautilusFile *changed_file; + NautilusFileDetails *file_details; directory = NAUTILUS_DIRECTORY (callback_data); directory->details->top_left_read_state->handle = NULL; - directory->details->top_left_read_state->file->details->top_left_text_is_up_to_date = TRUE; - changed_file = NULL; + file_details = directory->details->top_left_read_state->file->details; + + file_details->top_left_text_is_up_to_date = TRUE; + g_free (file_details->top_left_text); if (result == GNOME_VFS_OK) { - g_free (directory->details->top_left_read_state->file->details->top_left_text); - directory->details->top_left_read_state->file->details->top_left_text = - nautilus_extract_top_left_text (file_contents, bytes_read); - - directory->details->top_left_read_state->file->details->got_top_left_text = TRUE; + file_details->top_left_text = nautilus_extract_top_left_text (file_contents, bytes_read); + file_details->got_top_left_text = TRUE; } else { - g_free (directory->details->top_left_read_state->file->details->top_left_text); - directory->details->top_left_read_state->file->details->got_top_left_text = FALSE; + file_details->top_left_text = NULL; + file_details->got_top_left_text = FALSE; } g_free (file_contents); diff --git a/libnautilus-private/nautilus-directory-background.c b/libnautilus-private/nautilus-directory-background.c index 6ef421d97..c2710c619 100644 --- a/libnautilus-private/nautilus-directory-background.c +++ b/libnautilus-private/nautilus-directory-background.c @@ -397,8 +397,8 @@ nautilus_file_background_write_desktop_settings (char *color, char *image, EelBa /* We set it to white here because that's how backgrounds with a NULL color * are drawn by Nautilus - due to usage of eel_gdk_color_parse_with_white_default. */ - gnome_config_set_string ("/Background/Default/color1", "rgb:FFFF/FFFF/FFFF"); - gnome_config_set_string ("/Background/Default/color2", "rgb:FFFF/FFFF/FFFF"); + gnome_config_set_string ("/Background/Default/color1", "#FFFFFF"); + gnome_config_set_string ("/Background/Default/color2", "#FFFFFF"); gnome_config_set_string ("/Background/Default/simple", "solid"); gnome_config_set_string ("/Background/Default/gradient", "vertical"); } diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c index b65b43693..0aa9bbcd6 100644 --- a/libnautilus-private/nautilus-icon-container.c +++ b/libnautilus-private/nautilus-icon-container.c @@ -1580,7 +1580,7 @@ start_rubberbanding (NautilusIconContainer *container, } else { fill_color_str = nautilus_theme_get_theme_data ("directory", "selection_box_color"); if (fill_color_str == NULL) { - fill_color_str = g_strdup ("rgb:7777/BBBB/DDDD"); + fill_color_str = g_strdup ("#77BBDD"); } band_info->selection_rectangle = gnome_canvas_item_new diff --git a/libnautilus-private/nautilus-icon-text-item.c b/libnautilus-private/nautilus-icon-text-item.c index 94636506b..3128ec9d9 100644 --- a/libnautilus-private/nautilus-icon-text-item.c +++ b/libnautilus-private/nautilus-icon-text-item.c @@ -433,7 +433,7 @@ fetch_themed_color (const char *property_name, GdkColor *color) color_string = nautilus_theme_get_theme_data ("icon", property_name); if (color_string == NULL) { - color_string = g_strdup ("rgb:FFFF/FFFF/FFFF"); + color_string = g_strdup ("#FFFFFF"); } gdk_color_parse (color_string, color); g_free (color_string); diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c index c3be47ed9..bdae4430b 100644 --- a/src/file-manager/fm-directory-view.c +++ b/src/file-manager/fm-directory-view.c @@ -3780,7 +3780,8 @@ update_directory_in_scripts_menu (FMDirectoryView *view, NautilusDirectory *dire g_free (directory_uri); file_list = nautilus_file_list_sort_by_display_name - (nautilus_directory_get_file_list (directory)); + (nautilus_file_list_filter_hidden_and_backup + (nautilus_directory_get_file_list (directory), FALSE, FALSE)); any_scripts = FALSE; i = 0; diff --git a/src/nautilus-about.c b/src/nautilus-about.c index de27f5583..725319852 100644 --- a/src/nautilus-about.c +++ b/src/nautilus-about.c @@ -28,42 +28,38 @@ #include <config.h> #include "nautilus-about.h" - -#include <math.h> -#include <gnome.h> -#include <gdk/gdk.h> +#include <eel/eel-gdk-extensions.h> +#include <eel/eel-gdk-pixbuf-extensions.h> +#include <eel/eel-glib-extensions.h> +#include <eel/eel-gtk-extensions.h> +#include <eel/eel-scalable-font.h> +#include <eel/eel-string.h> #include <gdk-pixbuf/gdk-pixbuf.h> -#include <gtk/gtksignal.h> +#include <gtk/gtkdrawingarea.h> +#include <gtk/gtkframe.h> +#include <gtk/gtkmain.h> #include <gtk/gtkmenu.h> #include <gtk/gtkmenuitem.h> +#include <gtk/gtkstock.h> +#include <libgnome/gnome-i18n.h> +#include <libgnome/gnome-macros.h> #include <libgnome/gnome-util.h> -#include <libgnomeui/gnome-pixmap.h> -#include <eel/eel-gdk-extensions.h> -#include <eel/eel-gdk-pixbuf-extensions.h> -#include <eel/eel-gtk-macros.h> -#include <eel/eel-gtk-extensions.h> -#include <eel/eel-glib-extensions.h> +#include <libnautilus-private/nautilus-file-utilities.h> #include <libnautilus-private/nautilus-global-preferences.h> #include <libnautilus-private/nautilus-icon-factory.h> -#include <libnautilus-private/nautilus-file-utilities.h> -#include <eel/eel-scalable-font.h> -#include <eel/eel-string.h> #include <libnautilus-private/nautilus-theme.h> +#include <math.h> +#include <time.h> struct NautilusAboutDetails { GtkWidget *drawing_area; GdkPixbuf *background_pixbuf; int last_update_time; - int timer_task; + guint timer_task; char **authors; int *order_array; }; -static gboolean nautilus_about_close (NautilusAbout *about, - gpointer *unused); -static void nautilus_about_class_init (NautilusAboutClass *klass); -static void nautilus_about_init (NautilusAbout *about); -static void nautilus_about_destroy (GtkObject *object); static void nautilus_about_repaint (GtkWidget *drawing_area, GdkEventExpose *event, NautilusAbout *about); @@ -87,21 +83,13 @@ static int update_authors_if_necessary (gpointer callback_d /* delay between randomizing, in seconds */ #define UPDATE_TIME_INTERVAL 8 -/* gtk class definition boilerplate */ -EEL_CLASS_BOILERPLATE (NautilusAbout, - nautilus_about, - GTK_TYPE_DIALOG) - -static void -nautilus_about_class_init (NautilusAboutClass *about_class) -{ - GtkObjectClass *object_class = GTK_OBJECT_CLASS (about_class); - - object_class->destroy = nautilus_about_destroy; -} +GNOME_CLASS_BOILERPLATE (NautilusAbout, + nautilus_about, + GtkDialog, + GTK_TYPE_DIALOG) static void -nautilus_about_destroy (GtkObject *object) +nautilus_about_finalize (GObject *object) { NautilusAbout *about; @@ -120,13 +108,13 @@ nautilus_about_destroy (GtkObject *object) g_free (about->details); - EEL_CALL_PARENT (GTK_OBJECT_CLASS, destroy, (object)); + GNOME_CALL_PARENT (G_OBJECT_CLASS, finalize, (object)); } /* initialize the about */ static void -nautilus_about_init (NautilusAbout *about) +nautilus_about_instance_init (NautilusAbout *about) { char *background_path; GtkWidget *frame; @@ -162,7 +150,7 @@ nautilus_about_init (NautilusAbout *about) gtk_widget_set_events (about->details->drawing_area, GDK_EXPOSURE_MASK); g_signal_connect (about->details->drawing_area, "expose_event", - G_CALLBACK (nautilus_about_repaint), about); + G_CALLBACK (nautilus_about_repaint), about); gtk_widget_show (about->details->drawing_area); gtk_container_add (GTK_CONTAINER (frame), about->details->drawing_area); @@ -170,15 +158,9 @@ nautilus_about_init (NautilusAbout *about) /* set up the timer task */ about->details->timer_task = gtk_timeout_add (2000, update_authors_if_necessary, about); - /* configure the dialog */ + /* configure the dialog */ gtk_dialog_add_button (GTK_DIALOG (about), GTK_STOCK_OK, GTK_RESPONSE_OK); - - gtk_signal_connect - (GTK_OBJECT (about), - "close", - G_CALLBACK (nautilus_about_close), - NULL); } /* allocate a new about dialog */ @@ -442,22 +424,24 @@ nautilus_about_update_authors (NautilusAbout *about) if (about->details->timer_task == 0) { about->details->timer_task = gtk_timeout_add (2000, update_authors_if_necessary, about); - } + } /* schedule a redraw for the about box */ gtk_widget_queue_draw (GTK_WIDGET (about)); } -/* handle the dialog closing by killing the timer task */ - -static gboolean -nautilus_about_close (NautilusAbout *about, gpointer *unused) +static void +nautilus_about_hide (GtkWidget *widget) { + NautilusAbout *about; + + about = NAUTILUS_ABOUT (widget); if (about->details->timer_task != 0) { gtk_timeout_remove (about->details->timer_task); about->details->timer_task = 0; - } - return FALSE; + } + + GNOME_CALL_PARENT (GTK_WIDGET_CLASS, hide, (widget)); } static int @@ -476,3 +460,24 @@ update_authors_if_necessary (gpointer callback_data) } return TRUE; } + +static void +nautilus_about_hide_on_response (GtkDialog *dialog, int response_id) +{ + gtk_widget_hide (GTK_WIDGET (dialog)); +} + +static gboolean +nautilus_about_hide_on_delete (GtkWidget *widget, GdkEventAny *event) +{ + return gtk_widget_hide_on_delete (widget); +} + +static void +nautilus_about_class_init (NautilusAboutClass *class) +{ + G_OBJECT_CLASS (class)->finalize = nautilus_about_finalize; + GTK_WIDGET_CLASS (class)->delete_event = nautilus_about_hide_on_delete; + GTK_WIDGET_CLASS (class)->hide = nautilus_about_hide; + GTK_DIALOG_CLASS (class)->response = nautilus_about_hide_on_response; +} diff --git a/src/nautilus-bookmarks-window.c b/src/nautilus-bookmarks-window.c index 45a270bac..9c038c602 100644 --- a/src/nautilus-bookmarks-window.c +++ b/src/nautilus-bookmarks-window.c @@ -39,49 +39,50 @@ * more than one bookmark-editing window, these would be struct or * class fields. */ -static int bookmark_list_changed_signalID; +static int bookmark_list_changed_signal_id; static NautilusBookmarkList *bookmarks = NULL; static GtkWidget *bookmark_list_widget = NULL; /* awkward name to distinguish from NautilusBookmarkList */ static GtkWidget *name_field = NULL; -static int name_field_changed_signalID; +static int name_field_changed_signal_id; static GtkWidget *remove_button = NULL; static gboolean text_changed = FALSE; static GtkWidget *uri_field = NULL; -static int uri_field_changed_signalID; +static int uri_field_changed_signal_id; /* forward declarations */ -static NautilusBookmark *get_selected_bookmark (void); -static guint get_selected_row (void); -static gboolean get_selection_exists (void); -static void name_or_uri_field_activate (NautilusEntry *entry); -static void nautilus_bookmarks_window_restore_geometry - (GtkWidget *window); -static void on_bookmark_list_changed (NautilusBookmarkList *, - gpointer user_data); -static void on_name_field_changed (GtkEditable *, gpointer user_data); -static void on_remove_button_clicked (GtkButton *, gpointer user_data); -static void on_row_move (GtkCList *, - int old_row, - int new_row, - gpointer user_data); -static void on_select_row (GtkCList *, - int row, - int column, - GdkEventButton *, - gpointer user_data); -static gboolean on_text_field_focus_out_event (GtkWidget *, - GdkEventFocus *, - gpointer user_data); -static void on_uri_field_changed (GtkEditable *, gpointer user_data); -static gboolean on_window_delete_event (GtkWidget *, - GdkEvent *, - gpointer user_data); -static void on_window_hide_event (GtkWidget *, - gpointer user_data); -static void on_window_destroy_event (GtkWidget *, - gpointer user_data); -static void repopulate (void); -static void set_up_close_accelerator (GtkWidget *window); +static guint get_selected_row (void); +static gboolean get_selection_exists (void); +static void name_or_uri_field_activate (NautilusEntry *entry); +static void nautilus_bookmarks_window_restore_geometry (GtkWidget *window); +static void on_bookmark_list_changed (NautilusBookmarkList *list, + gpointer user_data); +static void on_name_field_changed (GtkEditable *editable, + gpointer user_data); +static void on_remove_button_clicked (GtkButton *button, + gpointer user_data); +static void on_row_move (GtkCList *clist, + int old_row, + int new_row, + gpointer user_data); +static void on_select_row (GtkCList *clist, + int row, + int column, + GdkEventButton *event, + gpointer user_data); +static gboolean on_text_field_focus_out_event (GtkWidget *widget, + GdkEventFocus *event, + gpointer user_data); +static void on_uri_field_changed (GtkEditable *editable, + gpointer user_data); +static gboolean on_window_delete_event (GtkWidget *widget, + GdkEvent *event, + gpointer user_data); +static void on_window_hide_event (GtkWidget *widget, + gpointer user_data); +static void on_window_destroy_event (GtkWidget *widget, + gpointer user_data); +static void repopulate (void); +static void set_up_close_accelerator (GtkWidget *window); #define BOOKMARK_LIST_COLUMN_ICON 0 #define BOOKMARK_LIST_COLUMN_NAME 1 @@ -97,6 +98,14 @@ static void set_up_close_accelerator (GtkWidget *window); #define BOOKMARKS_WINDOW_INITIAL_WIDTH 500 #define BOOKMARKS_WINDOW_INITIAL_HEIGHT 200 +static void +nautilus_bookmarks_window_response_callback (GtkDialog *dialog, + int response_id, + gpointer callback_data) +{ + gtk_widget_hide (GTK_WIDGET (dialog)); +} + /** * create_bookmarks_window: * @@ -193,71 +202,60 @@ create_bookmarks_window (NautilusBookmarkList *list, GObject *undo_manager_sourc gtk_widget_show (remove_button); gtk_box_pack_start (GTK_BOX (hbox2), remove_button, TRUE, FALSE, 0); - bookmark_list_changed_signalID = - gtk_signal_connect (GTK_OBJECT(bookmarks), "contents_changed", - G_CALLBACK(on_bookmark_list_changed), - NULL); + bookmark_list_changed_signal_id = + g_signal_connect (bookmarks, "contents_changed", + G_CALLBACK (on_bookmark_list_changed), NULL); - gtk_signal_connect (GTK_OBJECT(bookmark_list_widget), "row_move", - G_CALLBACK(on_row_move), - NULL); - - gtk_signal_connect (GTK_OBJECT(bookmark_list_widget), "select_row", - G_CALLBACK(on_select_row), - NULL); + g_signal_connect (bookmark_list_widget, "row_move", + G_CALLBACK (on_row_move), NULL); + + g_signal_connect (bookmark_list_widget, "select_row", + G_CALLBACK (on_select_row), NULL); g_signal_connect (window, "delete_event", - G_CALLBACK (on_window_delete_event), - NULL); + G_CALLBACK (on_window_delete_event), NULL); g_signal_connect (window, "hide", - G_CALLBACK (on_window_hide_event), - NULL); + G_CALLBACK (on_window_hide_event), NULL); g_signal_connect (window, "destroy", - G_CALLBACK (on_window_destroy_event), - NULL); + G_CALLBACK (on_window_destroy_event), NULL); - name_field_changed_signalID = + g_signal_connect (window, "response", + G_CALLBACK (nautilus_bookmarks_window_response_callback), NULL); + + name_field_changed_signal_id = g_signal_connect (name_field, "changed", - G_CALLBACK (on_name_field_changed), - NULL); + G_CALLBACK (on_name_field_changed), + NULL); g_signal_connect (name_field, "focus_out_event", - G_CALLBACK (on_text_field_focus_out_event), - NULL); + G_CALLBACK (on_text_field_focus_out_event), NULL); g_signal_connect (name_field, "activate", - G_CALLBACK (name_or_uri_field_activate), - NULL); + G_CALLBACK (name_or_uri_field_activate), NULL); - uri_field_changed_signalID = + uri_field_changed_signal_id = g_signal_connect (uri_field, "changed", - G_CALLBACK (on_uri_field_changed), - NULL); + G_CALLBACK (on_uri_field_changed), NULL); g_signal_connect (uri_field, "focus_out_event", - G_CALLBACK (on_text_field_focus_out_event), - NULL); + G_CALLBACK (on_text_field_focus_out_event), NULL); g_signal_connect (uri_field, "activate", - G_CALLBACK (name_or_uri_field_activate), - NULL); + G_CALLBACK (name_or_uri_field_activate), NULL); g_signal_connect (remove_button, "clicked", - G_CALLBACK (on_remove_button_clicked), - NULL); + G_CALLBACK (on_remove_button_clicked), NULL); /* Register to find out about icon theme changes */ - gtk_signal_connect_object_while_alive (nautilus_icon_factory_get (), - "icons_changed", - repopulate, - GTK_OBJECT (window)); + gtk_signal_connect_object_while_alive (nautilus_icon_factory_get (), "icons_changed", + repopulate, GTK_OBJECT (window)); /* Set selection mode after connecting signal to notice initial selected row. */ - gtk_clist_set_selection_mode(GTK_CLIST (bookmark_list_widget), - GTK_SELECTION_BROWSE); + gtk_clist_set_selection_mode (GTK_CLIST (bookmark_list_widget), + GTK_SELECTION_BROWSE); /* Fill in list widget with bookmarks, must be after signals are wired up. */ repopulate(); @@ -266,26 +264,25 @@ create_bookmarks_window (NautilusBookmarkList *list, GObject *undo_manager_sourc } static NautilusBookmark * -get_selected_bookmark () +get_selected_bookmark (void) { g_return_val_if_fail(NAUTILUS_IS_BOOKMARK_LIST(bookmarks), NULL); - return nautilus_bookmark_list_item_at(bookmarks, get_selected_row()); + return nautilus_bookmark_list_item_at(bookmarks, get_selected_row ()); } static guint -get_selected_row () +get_selected_row (void) { - g_assert(get_selection_exists()); - return GPOINTER_TO_UINT(g_list_nth_data( - GTK_CLIST(bookmark_list_widget)->selection, 0)); + g_assert (get_selection_exists()); + return GPOINTER_TO_UINT (g_list_nth_data (GTK_CLIST (bookmark_list_widget)->selection, 0)); } static gboolean -get_selection_exists () +get_selection_exists (void) { g_assert (GTK_CLIST(bookmark_list_widget)->selection_mode - == GTK_SELECTION_BROWSE); + == GTK_SELECTION_BROWSE); return GTK_CLIST(bookmark_list_widget)->rows > 0; } @@ -298,8 +295,7 @@ install_bookmark_icon (NautilusBookmark *bookmark, int row) if (!nautilus_bookmark_get_pixmap_and_mask (bookmark, NAUTILUS_ICON_SIZE_SMALLER, &pixmap, - &bitmap)) - { + &bitmap)) { return; } @@ -320,8 +316,7 @@ nautilus_bookmarks_window_restore_geometry (GtkWidget *window) window_geometry = nautilus_bookmark_list_get_window_geometry (bookmarks); - if (window_geometry != NULL) - { + if (window_geometry != NULL) { eel_gtk_window_set_initial_geometry_from_string (GTK_WINDOW (window), window_geometry, BOOKMARKS_WINDOW_MIN_WIDTH, BOOKMARKS_WINDOW_MIN_HEIGHT); @@ -397,10 +392,10 @@ on_remove_button_clicked (GtkButton *button, * back to the top. */ gtk_signal_handler_block(GTK_OBJECT(bookmarks), - bookmark_list_changed_signalID); + bookmark_list_changed_signal_id); nautilus_bookmark_list_delete_item_at(bookmarks, get_selected_row()); gtk_signal_handler_unblock(GTK_OBJECT(bookmarks), - bookmark_list_changed_signalID); + bookmark_list_changed_signal_id); gtk_clist_remove(GTK_CLIST(bookmark_list_widget), get_selected_row()); @@ -431,11 +426,11 @@ on_row_move (GtkCList *clist, * after repopulate(), thus reordering the correctly-ordered list. */ gtk_signal_handler_block(GTK_OBJECT(bookmarks), - bookmark_list_changed_signalID); + bookmark_list_changed_signal_id); nautilus_bookmark_list_delete_item_at(bookmarks, old_row); nautilus_bookmark_list_insert_item(bookmarks, bookmark, new_row); gtk_signal_handler_unblock(GTK_OBJECT(bookmarks), - bookmark_list_changed_signalID); + bookmark_list_changed_signal_id); g_object_unref (G_OBJECT (bookmark)); } @@ -471,7 +466,7 @@ on_select_row (GtkCList *clist, static void -update_bookmark_from_text () +update_bookmark_from_text (void) { if (text_changed) { NautilusBookmark *bookmark; @@ -489,11 +484,11 @@ update_bookmark_from_text () * after repopulate(), thus reordering the correctly-ordered list. */ gtk_signal_handler_block (GTK_OBJECT (bookmarks), - bookmark_list_changed_signalID); + bookmark_list_changed_signal_id); nautilus_bookmark_list_delete_item_at (bookmarks, selected_row); nautilus_bookmark_list_insert_item (bookmarks, bookmark, selected_row); gtk_signal_handler_unblock (GTK_OBJECT (bookmarks), - bookmark_list_changed_signalID); + bookmark_list_changed_signal_id); g_object_unref (G_OBJECT (bookmark)); } @@ -529,22 +524,12 @@ on_uri_field_changed (GtkEditable *editable, text_changed = TRUE; } -static void -save_geometry_and_hide (GtkWindow *window) -{ - g_assert (GTK_IS_WINDOW (window)); - - nautilus_bookmarks_window_save_geometry (window); - gtk_widget_hide (GTK_WIDGET (window)); -} - - static gboolean on_window_delete_event (GtkWidget *widget, GdkEvent *event, gpointer user_data) { - save_geometry_and_hide (GTK_WINDOW (widget)); + gtk_widget_hide (widget); return TRUE; } @@ -623,18 +608,18 @@ repopulate (void) gtk_widget_set_sensitive (uri_field, selection_exists); if (!selection_exists) { - /* Block signals to avoid modifying non-existent selected item. */ + /* Block signals to avoid modifying nonexistent selected item. */ gtk_signal_handler_block (GTK_OBJECT (name_field), - name_field_changed_signalID); + name_field_changed_signal_id); nautilus_entry_set_text (NAUTILUS_ENTRY (name_field), ""); gtk_signal_handler_unblock (GTK_OBJECT (name_field), - name_field_changed_signalID); + name_field_changed_signal_id); gtk_signal_handler_block (GTK_OBJECT (uri_field), - uri_field_changed_signalID); + uri_field_changed_signal_id); nautilus_entry_set_text (NAUTILUS_ENTRY (uri_field), ""); gtk_signal_handler_unblock (GTK_OBJECT (uri_field), - uri_field_changed_signalID); + uri_field_changed_signal_id); } gtk_clist_thaw (GTK_CLIST (bookmark_list_widget)); @@ -650,9 +635,8 @@ handle_close_accelerator (GtkWindow *window, g_assert (user_data == NULL); if (eel_gtk_window_event_is_close_accelerator (window, event)) { - save_geometry_and_hide (window); - gtk_signal_emit_stop_by_name - (GTK_OBJECT (window), "key_press_event"); + gtk_widget_hide (GTK_WIDGET (window)); + gtk_signal_emit_stop_by_name (GTK_OBJECT (window), "key_press_event"); return TRUE; } @@ -666,8 +650,6 @@ set_up_close_accelerator (GtkWidget *window) * here because we have to handle saving geometry before hiding the * window. */ - g_signal_connect (window, - "key_press_event", - G_CALLBACK (handle_close_accelerator), - NULL); + g_signal_connect (window, "key_press_event", + G_CALLBACK (handle_close_accelerator), NULL); } diff --git a/src/nautilus-information-panel.c b/src/nautilus-information-panel.c index 27f1f4812..4a31e8f47 100644 --- a/src/nautilus-information-panel.c +++ b/src/nautilus-information-panel.c @@ -124,7 +124,7 @@ static void add_command_buttons (NautilusSidebar *sideba GList *application_list); static void background_metadata_changed_callback (NautilusSidebar *sidebar); -#define DEFAULT_TAB_COLOR "rgb:9999/9999/9999" +#define DEFAULT_TAB_COLOR "#999999" /* FIXME bugzilla.gnome.org 41245: hardwired sizes */ #define SIDEBAR_MINIMUM_WIDTH 1 @@ -776,7 +776,7 @@ receive_dropped_color (NautilusSidebar *sidebar, } channels = (guint16 *) selection_data->data; - color_spec = g_strdup_printf ("rgb:%04hX/%04hX/%04hX", channels[0], channels[1], channels[2]); + color_spec = g_strdup_printf ("#%02X%02X%02X", channels[0] >> 8, channels[1] >> 8, channels[2] >> 8); switch (hit_test (sidebar, x, y)) { case NO_PART: diff --git a/src/nautilus-main.c b/src/nautilus-main.c index 2059f0c48..37ea782d7 100644 --- a/src/nautilus-main.c +++ b/src/nautilus-main.c @@ -169,6 +169,8 @@ main (int argc, char *argv[]) eel_make_warnings_and_criticals_stop_in_debugger (G_LOG_DOMAIN, "Bonobo", + "GLib", + "GLib-GObject", "Gdk", "GnomeUI", "GnomeVFS", diff --git a/src/nautilus-property-browser.c b/src/nautilus-property-browser.c index 95b608932..86889d53f 100644 --- a/src/nautilus-property-browser.c +++ b/src/nautilus-property-browser.c @@ -184,9 +184,9 @@ static void element_clicked_callback (GtkWidget gpointer callback_data); -#define BROWSER_BACKGROUND_COLOR "rgb:FFFF/FFFF/FFFF" +#define BROWSER_BACKGROUND_COLOR "#FFFFFF" -#define THEME_SELECT_COLOR "rgb:FFFF/9999/9999" +#define THEME_SELECT_COLOR "#FF9999" #define BROWSER_CATEGORIES_FILE_NAME "browser.xml" @@ -1154,10 +1154,10 @@ add_color_to_browser (GtkWidget *widget, int which_button, gpointer *data) if (which_button == GNOME_OK) { gnome_color_picker_get_d (GNOME_COLOR_PICKER (property_browser->details->color_picker), &color[0], &color[1], &color[2], &color[3]); color_spec = g_strdup_printf - ("rgb:%04hX/%04hX/%04hX", - (gushort) (color[0] * 65535.0 + 0.5), - (gushort) (color[1] * 65535.0 + 0.5), - (gushort) (color[2] * 65535.0 + 0.5)); + ("#%02X%02X%02X", + (guint) (color[0] * 255.0 + 0.5), + (guint) (color[1] * 255.0 + 0.5), + (guint) (color[2] * 255.0 + 0.5)); color_name = gtk_entry_get_text (GTK_ENTRY (property_browser->details->color_name)); stripped_color_name = g_strstrip (g_strdup (color_name)); diff --git a/src/nautilus-sidebar-tabs.c b/src/nautilus-sidebar-tabs.c index b151c24a7..ea3ddac4e 100644 --- a/src/nautilus-sidebar-tabs.c +++ b/src/nautilus-sidebar-tabs.c @@ -162,7 +162,7 @@ nautilus_sidebar_tabs_class_init (NautilusSidebarTabsClass *class) static void setup_light_text(NautilusSidebarTabs *sidebar_tabs) { - gdk_color_parse ("rgb:ff/ff/ff", &sidebar_tabs->details->text_color); + gdk_color_parse ("#ffffff", &sidebar_tabs->details->text_color); gdk_colormap_alloc_color (gtk_widget_get_colormap (GTK_WIDGET (sidebar_tabs)), &sidebar_tabs->details->text_color, FALSE, TRUE); } @@ -170,7 +170,7 @@ setup_light_text(NautilusSidebarTabs *sidebar_tabs) static void setup_dark_text(NautilusSidebarTabs *sidebar_tabs) { - gdk_color_parse ("rgb:00/00/00", &sidebar_tabs->details->text_color); + gdk_color_parse ("#000000", &sidebar_tabs->details->text_color); gdk_colormap_alloc_color (gtk_widget_get_colormap (GTK_WIDGET (sidebar_tabs)), &sidebar_tabs->details->text_color, FALSE, TRUE); } @@ -282,23 +282,23 @@ nautilus_sidebar_tabs_init (NautilusSidebarTabs *sidebar_tabs) sidebar_tabs->details = g_new0 (NautilusSidebarTabsDetails, 1); /* set up the default colors used for the structured (non-themed) tabs */ - gdk_color_parse ("rgb:99/99/99", &sidebar_tabs->details->tab_color); + gdk_color_parse ("#999999", &sidebar_tabs->details->tab_color); gdk_colormap_alloc_color (gtk_widget_get_colormap (GTK_WIDGET (sidebar_tabs)), &sidebar_tabs->details->tab_color, FALSE, TRUE); - gdk_color_parse ("rgb:ee/ee/ee", &sidebar_tabs->details->prelight_color); + gdk_color_parse ("#eeeeee", &sidebar_tabs->details->prelight_color); gdk_colormap_alloc_color (gtk_widget_get_colormap (GTK_WIDGET (sidebar_tabs)), &sidebar_tabs->details->prelight_color, FALSE, TRUE); - gdk_color_parse ("rgb:ff/ff/ff", &sidebar_tabs->details->background_color); + gdk_color_parse ("#ffffff", &sidebar_tabs->details->background_color); gdk_colormap_alloc_color (gtk_widget_get_colormap (GTK_WIDGET (sidebar_tabs)), &sidebar_tabs->details->background_color, FALSE, TRUE); - gdk_color_parse ("rgb:00/00/00", &sidebar_tabs->details->line_color); + gdk_color_parse ("#000000", &sidebar_tabs->details->line_color); gdk_colormap_alloc_color (gtk_widget_get_colormap (GTK_WIDGET (sidebar_tabs)), &sidebar_tabs->details->line_color, FALSE, TRUE); - gdk_color_parse ("rgb:d6/d6/d6", &sidebar_tabs->details->hilight_color); + gdk_color_parse ("#d6d6d6", &sidebar_tabs->details->hilight_color); gdk_colormap_alloc_color (gtk_widget_get_colormap (GTK_WIDGET (sidebar_tabs)), &sidebar_tabs->details->hilight_color, FALSE, TRUE); @@ -1660,7 +1660,7 @@ nautilus_sidebar_tabs_receive_dropped_color (NautilusSidebarTabs *sidebar_tabs, } channels = (guint16 *) selection_data->data; - color_spec = g_strdup_printf ("rgb:%04hX/%04hX/%04hX", channels[0], channels[1], channels[2]); + color_spec = g_strdup_printf ("#%02X%02X%02X", channels[0] >> 8, channels[1] >> 8, channels[2] >> 8); nautilus_sidebar_tabs_set_color(sidebar_tabs, color_spec); g_free (color_spec); } diff --git a/src/nautilus-sidebar-title.c b/src/nautilus-sidebar-title.c index a834c9a6d..819873129 100644 --- a/src/nautilus-sidebar-title.c +++ b/src/nautilus-sidebar-title.c @@ -386,21 +386,21 @@ nautilus_sidebar_title_select_text_color (NautilusSidebarTitle *sidebar_title) if (sidebar_title_color == NULL) { /* FIXME bugzilla.gnome.org 42496: for now, both the title and info colors are the same */ if (eel_background_is_dark (background)) { - sidebar_title_color = g_strdup("rgb:FFFF/FFFF/FFFF"); - sidebar_info_title_color = g_strdup("rgb:FFFF/FFFF/FFFF"); - sidebar_title_shadow_color = g_strdup("rgb:0000/0000/0000"); + sidebar_title_color = g_strdup ("#FFFFFF"); + sidebar_info_title_color = g_strdup ("#FFFFFF"); + sidebar_title_shadow_color = g_strdup ("#000000"); } else { - sidebar_title_color = g_strdup("rgb:0000/0000/0000"); - sidebar_info_title_color = g_strdup("rgb:0000/0000/0000"); - sidebar_title_shadow_color = g_strdup("rgb:FFFF/FFFF/FFFF"); + sidebar_title_color = g_strdup ("#000000"); + sidebar_info_title_color = g_strdup ("#000000"); + sidebar_title_shadow_color = g_strdup ("#FFFFFF"); } } else { if (sidebar_info_title_color == NULL) { sidebar_info_title_color = g_strdup (sidebar_title_color); } if (sidebar_title_shadow_color == NULL) { - sidebar_title_shadow_color = g_strdup("rgb:FFFF/FFFF/FFFF"); + sidebar_title_shadow_color = g_strdup ("#FFFFFF"); } } diff --git a/src/nautilus-sidebar.c b/src/nautilus-sidebar.c index 27f1f4812..4a31e8f47 100644 --- a/src/nautilus-sidebar.c +++ b/src/nautilus-sidebar.c @@ -124,7 +124,7 @@ static void add_command_buttons (NautilusSidebar *sideba GList *application_list); static void background_metadata_changed_callback (NautilusSidebar *sidebar); -#define DEFAULT_TAB_COLOR "rgb:9999/9999/9999" +#define DEFAULT_TAB_COLOR "#999999" /* FIXME bugzilla.gnome.org 41245: hardwired sizes */ #define SIDEBAR_MINIMUM_WIDTH 1 @@ -776,7 +776,7 @@ receive_dropped_color (NautilusSidebar *sidebar, } channels = (guint16 *) selection_data->data; - color_spec = g_strdup_printf ("rgb:%04hX/%04hX/%04hX", channels[0], channels[1], channels[2]); + color_spec = g_strdup_printf ("#%02X%02X%02X", channels[0] >> 8, channels[1] >> 8, channels[2] >> 8); switch (hit_test (sidebar, x, y)) { case NO_PART: |