diff options
author | Matthias Clasen <mclasen@fedoraproject.org> | 2008-04-22 16:11:33 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@fedoraproject.org> | 2008-04-22 16:11:33 +0000 |
commit | 2eabe4caedcd66c9fff44a21d3f120068f5a3dfb (patch) | |
tree | 7df5b7211a20c8e0d3cfc1420448ece921abc8a8 | |
parent | 4cd096a0eb67c2493ba809e8422818513e02bb7a (diff) | |
download | gnome-panel-2eabe4caedcd66c9fff44a21d3f120068f5a3dfb.tar.gz gnome-panel-2eabe4caedcd66c9fff44a21d3f120068f5a3dfb.tar.xz gnome-panel-2eabe4caedcd66c9fff44a21d3f120068f5a3dfb.zip |
grr, finally
-rw-r--r-- | gnome-panel-launch-with-gio.patch | 127 | ||||
-rw-r--r-- | gnome-panel.spec | 15 | ||||
-rw-r--r-- | timezone-64.patch | 135 |
3 files changed, 276 insertions, 1 deletions
diff --git a/gnome-panel-launch-with-gio.patch b/gnome-panel-launch-with-gio.patch new file mode 100644 index 0000000..fbe354b --- /dev/null +++ b/gnome-panel-launch-with-gio.patch @@ -0,0 +1,127 @@ +diff -up gnome-panel-2.22.1.2/gnome-panel/panel-menu-items.c.launch-with-gio gnome-panel-2.22.1.2/gnome-panel/panel-menu-items.c +--- gnome-panel-2.22.1.2/gnome-panel/panel-menu-items.c.launch-with-gio 2008-04-20 23:54:37.000000000 -0400 ++++ gnome-panel-2.22.1.2/gnome-panel/panel-menu-items.c 2008-04-20 23:54:37.000000000 -0400 +@@ -41,6 +41,7 @@ + + #include <libgnome/gnome-url.h> + #include <libgnomeui/gnome-url.h> ++#include <libgnomeui/gnome-password-dialog.h> + + #include "menu.h" + #include "panel-action-button.h" +@@ -96,6 +97,51 @@ struct _PanelDesktopMenuItemPrivate { + guint append_lock_logout : 1; + }; + ++typedef struct { ++ GMountOperation *mount_op; ++ GdkScreen *screen; ++} MountOperationHandle; ++ ++static void ++mount_async_callback (GObject *source_object, ++ GAsyncResult *result, ++ gpointer user_data) ++{ ++ GError *error = NULL; ++ GFile *file; ++ MountOperationHandle *handle = user_data; ++ ++ file = G_FILE (source_object); ++ if (g_file_mount_enclosing_volume_finish (file, result, &error)) { ++ char *uri = g_file_get_uri (file); ++ // FIXME use an app launch context ++ g_app_info_launch_default_for_uri (uri, NULL, &error); ++ g_free (uri); ++ } ++ else { ++ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED) && ++ !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_FAILED_HANDLED)) { ++ char *primary, *escaped, *url; ++ url = g_file_get_uri (file); ++ escaped = g_markup_escape_text (url, -1); ++ g_free (url); ++ primary = g_strdup_printf (_("Could not open location '%s'"), ++ escaped); ++ g_free (escaped); ++ panel_error_dialog (NULL, handle->screen, ++ "cannot_show_url", TRUE, ++ primary, error->message); ++ g_free (primary); ++ } ++ g_error_free (error); ++ } ++ ++ if (handle->mount_op) ++ g_object_unref (handle->mount_op); ++ ++ g_free (handle); ++} ++ + static void + activate_uri (GtkWidget *menuitem, + const char *path) +@@ -125,12 +171,28 @@ activate_uri (GtkWidget *menuitem, + + command = g_strdup_printf ("nautilus --no-desktop %s", url); + gdk_spawn_command_line_on_screen (screen, command, &error); +- } else ++ } else { ++ // FIXME use an app launch context + g_app_info_launch_default_for_uri (url, NULL, &error); +- //gnome_url_show_on_screen (url, screen, &error); ++ } + + if (error != NULL) { +- if (error->code != GNOME_URL_ERROR_CANCELLED) { ++ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_MOUNTED)) { ++ MountOperationHandle *handle; ++ ++ handle = g_new (MountOperationHandle, 1); ++ file = g_file_new_for_uri (url); ++ ++ /* If it's not mounted, try to mount it ourselves */ ++ handle->mount_op = panel_mount_operation_new (NULL); ++ handle->screen = screen; ++ ++ g_file_mount_enclosing_volume (file, G_MOUNT_MOUNT_NONE, handle->mount_op, ++ NULL, mount_async_callback, handle); ++ g_object_unref (file); ++ ++ } ++ else { + char *primary; + escaped = g_markup_escape_text (url, -1); + primary = g_strdup_printf (_("Could not open location '%s'"), +diff -up gnome-panel-2.22.1.2/gnome-panel/panel-mount-operation.c.launch-with-gio gnome-panel-2.22.1.2/gnome-panel/panel-mount-operation.c +--- gnome-panel-2.22.1.2/gnome-panel/panel-mount-operation.c.launch-with-gio 2008-04-21 00:10:20.000000000 -0400 ++++ gnome-panel-2.22.1.2/gnome-panel/panel-mount-operation.c 2008-04-21 00:13:35.000000000 -0400 +@@ -102,6 +102,18 @@ password_dialog_button_clicked (GtkDialo + anon = gnome_password_dialog_anon_selected (gpd); + g_mount_operation_set_anonymous (op, anon); + ++ switch (gnome_password_dialog_get_remember (gpd)) { ++ case GNOME_PASSWORD_DIALOG_REMEMBER_NOTHING: ++ g_mount_operation_set_password_save (op, G_PASSWORD_SAVE_NEVER); ++ break; ++ case GNOME_PASSWORD_DIALOG_REMEMBER_SESSION: ++ g_mount_operation_set_password_save (op, G_PASSWORD_SAVE_FOR_SESSION); ++ break; ++ case GNOME_PASSWORD_DIALOG_REMEMBER_FOREVER: ++ g_mount_operation_set_password_save (op, G_PASSWORD_SAVE_PERMANENTLY); ++ break; ++ } ++ + g_mount_operation_reply (op, G_MOUNT_OPERATION_HANDLED); + } else { + g_mount_operation_reply (op, G_MOUNT_OPERATION_ABORTED); +@@ -136,6 +148,9 @@ ask_password (GMountOperation *op, + flags & G_ASK_PASSWORD_NEED_DOMAIN); + gnome_password_dialog_set_show_userpass_buttons (GNOME_PASSWORD_DIALOG (dialog), + flags & G_ASK_PASSWORD_ANONYMOUS_SUPPORTED); ++ gnome_password_dialog_set_show_remember (GNOME_PASSWORD_DIALOG (dialog), ++ flags & G_ASK_PASSWORD_SAVING_SUPPORTED); ++ + if (default_domain) { + gnome_password_dialog_set_domain (GNOME_PASSWORD_DIALOG (dialog), + default_domain); diff --git a/gnome-panel.spec b/gnome-panel.spec index e79f409..f41d676 100644 --- a/gnome-panel.spec +++ b/gnome-panel.spec @@ -22,7 +22,7 @@ Summary: GNOME panel Name: gnome-panel Version: 2.22.1.2 -Release: 3%{?dist} +Release: 4%{?dist} URL: http://www.gnome.org Source0: http://download.gnome.org/sources/gnome-panel/2.22/%{name}-%{version}.tar.bz2 @@ -122,6 +122,12 @@ Patch31: clock2.patch Patch32: clock-help.patch +Patch33: gnome-panel-use-gio.patch +# http://bugzilla.gnome.org/show_bug.cgi?id=529243 +Patch34: gnome-panel-launch-with-gio.patch +# fixed in upstream svn +Patch35: timezone-64.patch + Conflicts: gnome-power-manager < 2.15.3 %description @@ -173,6 +179,9 @@ Panel Applets using the libpanel-applet library. %patch30 -p1 -b .clock1 %patch31 -p1 -b .clock2 %patch32 -p1 -b .clock-help +%patch33 -p1 -b .use-gio +%patch34 -p1 -b .launch-with-gio +%patch35 -p1 -b .timezone-64 . %{SOURCE6} @@ -357,6 +366,10 @@ fi %{_datadir}/gtk-doc/html/* %changelog +* Fri Apr 18 2008 Matthias Clasen <mclasen@redhat.com> - 2.22.1.2-4 +- Use gio to open places +- Fix a 64bit issue with timezone handling in the clock + * Fri Apr 18 2008 Matthias Clasen <mclasen@redhat.com> - 2.22.1.2-3 - Move the trash applet back where it belongs, to the corner (#439416) diff --git a/timezone-64.patch b/timezone-64.patch new file mode 100644 index 0000000..42f710b --- /dev/null +++ b/timezone-64.patch @@ -0,0 +1,135 @@ +--- trunk/applets/clock/system-timezone.c 2008/04/11 12:11:19 11053 ++++ trunk/applets/clock/system-timezone.c 2008/04/11 13:11:59 11054 +@@ -447,14 +447,14 @@ + const char *value, + GError **error) + { +- GError *our_error; +- char *content; +- unsigned int len; +- char *key_eq; +- char **lines; +- gboolean replaced; +- gboolean retval; +- int n; ++ GError *our_error; ++ char *content; ++ gsize len; ++ char *key_eq; ++ char **lines; ++ gboolean replaced; ++ gboolean retval; ++ int n; + + if (!g_file_test (filename, G_FILE_TEST_IS_REGULAR)) + return TRUE; +@@ -647,16 +647,16 @@ + return tz; + } + +-typedef gboolean (*CompareFiles) (struct stat *a_stat, +- struct stat *b_stat, +- const char *a_content, +- unsigned int a_content_len, +- const char *b_filename); ++typedef gboolean (*CompareFiles) (struct stat *a_stat, ++ struct stat *b_stat, ++ const char *a_content, ++ gsize a_content_len, ++ const char *b_filename); + + static char * + recursive_compare (struct stat *localtime_stat, + const char *localtime_content, +- unsigned int localtime_content_len, ++ gsize localtime_content_len, + char *file, + CompareFiles compare_func) + { +@@ -709,11 +709,11 @@ + + + static gboolean +-files_are_identical_inode (struct stat *a_stat, +- struct stat *b_stat, +- const char *a_content, +- unsigned int a_content_len, +- const char *b_filename) ++files_are_identical_inode (struct stat *a_stat, ++ struct stat *b_stat, ++ const char *a_content, ++ gsize a_content_len, ++ const char *b_filename) + { + return (a_stat->st_ino == b_stat->st_ino); + } +@@ -740,15 +740,15 @@ + } + + static gboolean +-files_are_identical_content (struct stat *a_stat, +- struct stat *b_stat, +- const char *a_content, +- unsigned int a_content_len, +- const char *b_filename) +-{ +- char *b_content = NULL; +- unsigned int b_content_len = -1; +- int cmp; ++files_are_identical_content (struct stat *a_stat, ++ struct stat *b_stat, ++ const char *a_content, ++ gsize a_content_len, ++ const char *b_filename) ++{ ++ char *b_content = NULL; ++ gsize b_content_len = -1; ++ int cmp; + + if (a_stat->st_size != b_stat->st_size) + return FALSE; +@@ -772,10 +772,10 @@ + static char * + system_timezone_read_etc_localtime_content (void) + { +- struct stat stat_localtime; +- char *localtime_content = NULL; +- unsigned int localtime_content_len = -1; +- char *retval; ++ struct stat stat_localtime; ++ char *localtime_content = NULL; ++ gsize localtime_content_len = -1; ++ char *retval; + + if (g_stat (ETC_LOCALTIME, &stat_localtime) != 0) + return NULL; +@@ -866,11 +866,11 @@ + system_timezone_is_zone_file_valid (const char *zone_file, + GError **error) + { +- GError *our_error; +- GIOChannel *channel; +- GIOStatus status; +- char buffer[strlen (TZ_MAGIC)]; +- unsigned int read; ++ GError *our_error; ++ GIOChannel *channel; ++ GIOStatus status; ++ char buffer[strlen (TZ_MAGIC)]; ++ gsize read; + + /* First, check the zone_file is properly rooted */ + if (!g_str_has_prefix (zone_file, SYSTEM_ZONEINFODIR"/")) { +@@ -925,9 +925,9 @@ + system_timezone_set_etc_timezone (const char *zone_file, + GError **error) + { +- GError *our_error; +- char *content; +- unsigned int len; ++ GError *our_error; ++ char *content; ++ gsize len; + + if (!system_timezone_is_zone_file_valid (zone_file, error)) + return FALSE; |