diff --git a/gnome-session-2.15.91-desensitize-invalid-buttons.patch b/gnome-session-2.15.91-desensitize-invalid-buttons.patch new file mode 100644 index 0000000..275b094 --- /dev/null +++ b/gnome-session-2.15.91-desensitize-invalid-buttons.patch @@ -0,0 +1,191 @@ +--- gnome-session-2.15.91/gnome-session/startup-programs.c.desensitize-invalid-buttons 2006-08-14 13:59:45.000000000 -0400 ++++ gnome-session-2.15.91/gnome-session/startup-programs.c 2006-08-14 14:01:23.000000000 -0400 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -541,6 +542,48 @@ startup_list_delete (GSList **sl, GtkTre + spc_write_state (); + } + ++gboolean ++startup_list_can_edit (GSList **sl, GtkTreeModel *model, GtkTreeSelection *sel) ++{ ++ ManualClient *client; ++ GtkTreeIter iter; ++ char *path, *basename; ++ const char * const * system_dirs; ++ int i; ++ gboolean can_edit = TRUE; ++ ++ if (!gtk_tree_selection_get_selected (sel, NULL, &iter)) return FALSE; ++ ++ gtk_tree_model_get (model, &iter, 0, &client, -1); ++ ++ if (g_file_test (client->desktop_file, G_FILE_TEST_EXISTS) && ++ access (client->desktop_file, W_OK) != 0) ++ return FALSE; ++ ++ basename = g_path_get_basename (client->desktop_file); ++ ++ system_dirs = g_get_system_data_dirs (); ++ for (i = 0; system_dirs[i] != NULL && can_edit; i++) ++ { ++ path = g_build_filename (system_dirs[i], "gnome", "autostart", basename, NULL); ++ if (g_file_test (path, G_FILE_TEST_EXISTS) && access (path, W_OK) != 0) ++ can_edit = FALSE; ++ g_free (path); ++ } ++ ++ system_dirs = g_get_system_config_dirs (); ++ for (i = 0; system_dirs[i] != NULL && can_edit; i++) ++ { ++ path = g_build_filename (system_dirs[i], "autostart", basename, NULL); ++ if (g_file_test (path, G_FILE_TEST_EXISTS) && access (path, W_OK) != 0) ++ can_edit = FALSE; ++ g_free (path); ++ } ++ ++ g_free (basename); ++ return can_edit; ++} ++ + /* Check if the selected client can be enabled */ + gboolean + startup_list_can_enable (GSList **sl, GtkTreeModel *model, GtkTreeSelection *sel) +--- gnome-session-2.15.91/gnome-session/session-properties-capplet.c.desensitize-invalid-buttons 2006-08-14 14:02:21.000000000 -0400 ++++ gnome-session-2.15.91/gnome-session/session-properties-capplet.c 2006-08-14 14:15:57.000000000 -0400 +@@ -91,16 +91,14 @@ static void saved_sessions (GtkWidget *w + #define SESSION_STOCK_EDIT "session-stock-edit" + + static void +-selection_changed_cb (GtkTreeSelection *selection, GtkTreeView *view) ++session_selection_changed_cb (GtkTreeSelection *selection, GtkTreeView *view) + { + gboolean sel; + GtkWidget *edit_button; + GtkWidget *delete_button; +- GtkWidget *enable_button; + + edit_button = g_object_get_data (G_OBJECT (view), "edit"); + delete_button = g_object_get_data (G_OBJECT (view), "delete"); +- enable_button = g_object_get_data (G_OBJECT (view), "enable"); + + sel = gtk_tree_selection_get_selected (selection, NULL, NULL); + +@@ -109,29 +107,56 @@ selection_changed_cb (GtkTreeSelection * + + if (delete_button) + gtk_widget_set_sensitive (delete_button, sel); ++} ++ ++static void ++startup_selection_changed_cb (GtkTreeSelection *selection, GtkTreeView *view) ++{ ++ gboolean sel, can_edit; ++ GtkWidget *edit_button; ++ GtkWidget *delete_button; ++ GtkWidget *enable_button; + +- if (enable_button) ++ edit_button = g_object_get_data (G_OBJECT (view), "edit"); ++ delete_button = g_object_get_data (G_OBJECT (view), "delete"); ++ enable_button = g_object_get_data (G_OBJECT (view), "enable"); ++ ++ if (!edit_button || !delete_button || !enable_button) ++ return; ++ ++ sel = gtk_tree_selection_get_selected (selection, NULL, NULL); ++ can_edit = startup_list_can_edit (&startup_list, startup_store, startup_sel); ++ ++ if (sel && can_edit) ++ { ++ gtk_widget_set_sensitive (edit_button, TRUE); ++ gtk_widget_set_sensitive (delete_button, TRUE); ++ } ++ else + { +- if (sel) ++ gtk_widget_set_sensitive (edit_button, FALSE); ++ gtk_widget_set_sensitive (delete_button, FALSE); ++ } ++ ++ if (sel) ++ { ++ if (startup_list_can_enable (&startup_list, startup_store, startup_sel)) + { +- if (startup_list_can_enable (&startup_list, startup_store, startup_sel)) +- { +- gtk_button_set_label (GTK_BUTTON (enable_button), _("Enable")); +- gtk_button_set_image (GTK_BUTTON (enable_button), +- gtk_image_new_from_stock (GTK_STOCK_YES, GTK_ICON_SIZE_BUTTON)); +- } +- else +- { +- gtk_button_set_label (GTK_BUTTON (enable_button), _("Disable")); +- gtk_button_set_image (GTK_BUTTON (enable_button), +- gtk_image_new_from_stock (GTK_STOCK_NO, GTK_ICON_SIZE_BUTTON)); +- } +- +- gtk_widget_set_sensitive (enable_button, TRUE); ++ gtk_button_set_label (GTK_BUTTON (enable_button), _("Enable")); ++ gtk_button_set_image (GTK_BUTTON (enable_button), ++ gtk_image_new_from_stock (GTK_STOCK_YES, GTK_ICON_SIZE_BUTTON)); + } + else +- gtk_widget_set_sensitive (enable_button, FALSE); ++ { ++ gtk_button_set_label (GTK_BUTTON (enable_button), _("Disable")); ++ gtk_button_set_image (GTK_BUTTON (enable_button), ++ gtk_image_new_from_stock (GTK_STOCK_NO, GTK_ICON_SIZE_BUTTON)); ++ } ++ ++ gtk_widget_set_sensitive (enable_button, TRUE); + } ++ else ++ gtk_widget_set_sensitive (enable_button, FALSE); + } + + static void +@@ -345,7 +370,7 @@ capplet_build (void) + GTK_WIDGET (sessions_view)); + sessions_sel = gtk_tree_view_get_selection (sessions_view); + gtk_tree_selection_set_mode (sessions_sel, GTK_SELECTION_SINGLE); +- g_signal_connect (G_OBJECT (sessions_sel), "changed", (GCallback) selection_changed_cb, sessions_view); ++ g_signal_connect (G_OBJECT (sessions_sel), "changed", (GCallback) session_selection_changed_cb, sessions_view); + renderer = gtk_cell_renderer_text_new (); + column = gtk_tree_view_column_new_with_attributes (_("Session Name"), renderer, "text", 0, NULL); + gtk_tree_view_append_column (sessions_view, column); +@@ -433,7 +458,7 @@ capplet_build (void) + GTK_WIDGET (startup_view)); + startup_sel = gtk_tree_view_get_selection (startup_view); + gtk_tree_selection_set_mode (startup_sel, GTK_SELECTION_SINGLE); +- g_signal_connect (G_OBJECT (startup_sel), "changed", (GCallback) selection_changed_cb, startup_view); ++ g_signal_connect (G_OBJECT (startup_sel), "changed", (GCallback) startup_selection_changed_cb, startup_view); + renderer = gtk_cell_renderer_text_new (); + column = gtk_tree_view_column_new_with_attributes (_("Command"), renderer, "text", 2, NULL); + gtk_tree_view_append_column (startup_view, column); +@@ -604,7 +629,7 @@ enable_startup_cb (void) + else + startup_list_disable (&startup_list, startup_store, startup_sel); + +- selection_changed_cb (startup_sel, startup_view); ++ startup_selection_changed_cb (startup_sel, startup_view); + } + + static void +--- gnome-session-2.15.91/gnome-session/session-properties-capplet.h.desensitize-invalid-buttons 2006-08-14 14:01:51.000000000 -0400 ++++ gnome-session-2.15.91/gnome-session/session-properties-capplet.h 2006-08-14 14:02:09.000000000 -0400 +@@ -34,6 +34,8 @@ void startup_list_edit_dialog (GSList ** + void startup_list_delete (GSList **sl, + GtkTreeModel *model, GtkTreeSelection *sel); + ++gboolean startup_list_can_edit (GSList **sl, GtkTreeModel *model, GtkTreeSelection *sel); ++ + gboolean startup_list_can_enable (GSList **sl, GtkTreeModel *model, GtkTreeSelection *sel); + void startup_list_enable (GSList **sl, GtkTreeModel *model, GtkTreeSelection *sel); + void startup_list_disable (GSList **sl, GtkTreeModel *model, GtkTreeSelection *sel); diff --git a/gnome-session.spec b/gnome-session.spec index a50d1c7..45e3226 100644 --- a/gnome-session.spec +++ b/gnome-session.spec @@ -13,8 +13,8 @@ Summary: GNOME session manager Name: gnome-session -Version: 2.15.90 -Release: 4%{?dist} +Version: 2.15.91 +Release: 1%{?dist} URL: http://www.gnome.org Source0: %{name}-%{version}.tar.bz2 Source1: redhat-default-session @@ -40,16 +40,24 @@ Conflicts: gdm < 1:2.6.0.8-5 Patch1: gnome-session-2.2.2-icons.patch Patch2: gnome-session-2.0.5-login.patch Patch3: gnome-session-2.0.5-dithering.patch + ## http://bugzilla.gnome.org/show_bug.cgi?id=106450 Patch6: gnome-session-2.9.4-gnome-common.patch + # Launch gnome-user-share on login if enabled Patch7: gnome-session-2.13.92-user-share.patch + # do shaped window for splash screen Patch8: gnome-session-2.12.0-shaped.patch + # too much crashing Patch9: gnome-session-2.13.4-no-crashes.patch -Patch12: gnome-session-2.13.92-desensitize-invalid-buttons.patch -Patch13: gnome-session-2.15.90-window-manager.patch + +# http://bugzilla.gnome.org/show_bug.cgi?id=333670 +Patch12: gnome-session-2.15.91-desensitize-invalid-buttons.patch + +# http://bugzilla.gnome.org/show_bug.cgi?id=350848 +Patch13: gnome-session-2.15.91-window-manager.patch BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: pango-devel >= %{pango_version} @@ -167,6 +175,9 @@ done %{_datadir}/gnome/autostart %changelog +* Mon Aug 14 2006 Ray Strode - 2.15.91-1.fc6 +- Update to 2.15.91 + * Sun Aug 13 2006 Ray Strode - 2.15.90-4.fc6 - fix window manager launching script. Patch from Tim Vismor (bug 202312)