Hello community,
here is the log from the commit of package gnome-panel
checked in at Thu Nov 16 01:01:53 CET 2006.
--------
--- GNOME/gnome-panel/gnome-panel.changes 2006-11-07 18:50:15.000000000 +0100
+++ /mounts/work_src_done/STABLE/gnome-panel/gnome-panel.changes 2006-11-15 22:46:52.000000000 +0100
@@ -1,0 +2,6 @@
+Wed Nov 15 22:45:19 CET 2006 - jimmyk@suse.de
+
+- Updated recently-used-apps.patch to be compatible with new recently-used
+ format, BNC #221392.
+
+-------------------------------------------------------------------
New:
----
gnome-panel-recently-used-apps.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gnome-panel.spec ++++++
--- /var/tmp/diff_new_pack.LZjGkh/_old 2006-11-16 01:01:38.000000000 +0100
+++ /var/tmp/diff_new_pack.LZjGkh/_new 2006-11-16 01:01:38.000000000 +0100
@@ -18,7 +18,7 @@
Group: System/GUI/GNOME
Autoreqprov: on
Version: 2.16.1
-Release: 22
+Release: 26
Summary: The GNOME 2.x Desktop Panel
Source: ftp://ftp.gnome.org/pub/gnome/sources/gnome-panel/2.11/gnome-panel-%{version}.tar.bz2
URL: http://www.gnome.org
@@ -52,6 +52,7 @@
Patch53: gnome-panel-204645-variable-init.patch
Patch54: gnome-panel-bgo-363309-variable-init.patch
Patch55: gnome-panel-202076-root-launchers.patch
+Patch56: gnome-panel-recently-used-apps.patch
Obsoletes: gnome-core gnome-panel-nld
%description
@@ -242,6 +243,7 @@
%patch53
%patch54
%patch55
+%patch56 -p1
# this is for the gnome-panel-corners.patch
# which has been temporarily removed for reworking
#cd icons
@@ -368,6 +370,9 @@
%{prefix}/share/gnome-2.0/ui/GNOME_FishApplet.xml
%changelog -n gnome-panel
+* Wed Nov 15 2006 - jimmyk@suse.de
+- Updated recently-used-apps.patch to be compatible with new recently-used
+ format, BNC #221392.
* Tue Nov 07 2006 - jhargadon@suse.de
- removed obsolete patch gnome-panel-help-item.patch as a partial
fix for bug #214294
++++++ gnome-panel-recently-used-apps.patch ++++++
diff -uprN gnome-panel-2.16.1-pristine/gnome-panel/panel-run-dialog.c gnome-panel-2.16.1/gnome-panel/panel-run-dialog.c
--- gnome-panel-2.16.1-pristine/gnome-panel/panel-run-dialog.c 2006-08-07 17:07:46.000000000 -0400
+++ gnome-panel-2.16.1/gnome-panel/panel-run-dialog.c 2006-10-23 18:11:16.000000000 -0400
@@ -59,6 +59,14 @@
#include "panel-lockdown.h"
#include "panel-xutils.h"
+#include
+#if GTK_CHECK_VERSION (2,10,0)
+# define USE_GTK_RECENT_MANAGER
+# include
+#else
+# include "egg-recent-model.h"
+#endif
+
#define ICON_SIZE 48.0
typedef struct {
@@ -112,6 +120,8 @@ enum {
static PanelRunDialog *static_dialog = NULL;
+static void panel_run_dialog_update_recent_apps (PanelRunDialog *dialog, const gchar *cmd);
+
static void
panel_run_dialog_destroy (PanelRunDialog *dialog)
{
@@ -420,6 +430,8 @@ panel_run_dialog_execute (PanelRunDialog
gnome_entry_prepend_history (GNOME_ENTRY (dialog->gnome_entry),
TRUE, /* save item in history */
command);
+
+ panel_run_dialog_update_recent_apps (dialog, command);
/* only close the dialog if we successfully showed or launched something */
gtk_widget_destroy (dialog->run_dialog);
@@ -672,6 +684,160 @@ panel_run_dialog_find_command_idle (Pane
return FALSE;
}
+static void
+panel_run_dialog_update_recent_apps (PanelRunDialog *dialog, const gchar *cmd)
+{
+ GtkTreeIter iter;
+ GtkTreeModel *model = NULL;
+ GtkTreePath *path = NULL;
+
+ gchar *found_ditem_path = NULL;
+ gchar *found_ditem_uri = NULL;
+ gchar *found_cmd = NULL;
+
+ gchar *cmd_i;
+ gchar *ditem_path_i;
+
+ gboolean fuzzy;
+
+#ifdef USE_GTK_RECENT_MANAGER
+ GtkRecentManager *recent_manager;
+ GtkRecentData recent_data;
+#else
+ EggRecentModel *recent_model;
+ EggRecentItem *recent_item;
+#endif
+
+ GError *error = NULL;
+
+
+ if (! cmd)
+ return;
+
+ model = gtk_tree_view_get_model (GTK_TREE_VIEW (dialog->program_list));
+ path = gtk_tree_path_new_first ();
+
+ if (! path || ! gtk_tree_model_get_iter (model, & iter, path)) {
+ if (path)
+ gtk_tree_path_free (path);
+
+ return;
+ }
+
+ do {
+ cmd_i = NULL;
+ ditem_path_i = NULL;
+
+ gtk_tree_model_get (
+ model, & iter,
+ COLUMN_EXEC, & cmd_i,
+ COLUMN_PATH, & ditem_path_i,
+ -1
+ );
+
+ if (cmd_i && ditem_path_i) {
+ fuzzy = FALSE;
+
+ if (fuzzy_command_match (sure_string (cmd), cmd_i, & fuzzy)) {
+ g_free (found_ditem_path);
+
+ found_ditem_path = g_strdup (ditem_path_i);
+ found_cmd = g_strdup (cmd_i);
+
+ if (! fuzzy) {
+ /*
+ * if not fuzzy then we have a precise
+ * match and we can quit, else keep
+ * searching for a better match
+ */
+ g_free (cmd_i);
+ g_free (ditem_path_i);
+
+ break;
+ }
+ }
+ }
+
+ g_free (cmd_i);
+ g_free (ditem_path_i);
+
+ } while (gtk_tree_model_iter_next (model, & iter));
+
+ gtk_tree_path_free (path);
+
+#ifdef USE_GTK_RECENT_MANAGER
+ recent_manager = gtk_recent_manager_get_default ();
+
+ if (! recent_manager)
+ goto exit;
+#else
+ recent_model = egg_recent_model_new (EGG_RECENT_MODEL_SORT_NONE);
+
+ if (! recent_model)
+ goto exit;
+#endif
+
+ if (found_ditem_path) {
+ found_ditem_uri = g_filename_to_uri (found_ditem_path, NULL, & error);
+
+ if (! error) {
+#ifdef USE_GTK_RECENT_MANAGER
+ recent_data.display_name = NULL;
+ recent_data.description = NULL;
+ recent_data.mime_type = g_strdup ("application/x-desktop");
+ recent_data.is_private = TRUE;
+
+ recent_data.app_name = g_strdup (g_get_application_name ());
+ if (! recent_data.app_name)
+ recent_data.app_name = g_strdup ("gnome-panel run dialog");
+
+ recent_data.app_exec = g_strdup (g_strdup (found_cmd));
+ if (! recent_data.app_exec)
+ recent_data.app_exec = g_strdup ("gnome-open %u");
+
+ recent_data.groups = g_new0 (gchar *, 2);
+ recent_data.groups [0] = g_strdup ("recently-used-apps");
+ recent_data.groups [1] = NULL;
+
+ gtk_recent_manager_add_full (recent_manager, found_ditem_uri, & recent_data);
+
+ g_free (recent_data.mime_type);
+ g_free (recent_data.app_name);
+ g_free (recent_data.app_exec);
+ g_free (recent_data.groups [0]);
+ g_free (recent_data.groups);
+
+#else
+
+ recent_item = egg_recent_item_new_from_uri (found_ditem_uri);
+ egg_recent_item_add_group (recent_item, "recently-used-apps");
+ egg_recent_item_set_private (recent_item, TRUE);
+
+ egg_recent_model_add_full (recent_model, recent_item);
+
+ if (recent_item)
+ egg_recent_item_unref (recent_item);
+#endif
+ }
+ else {
+ g_warning ("unable to create uri from [%s] to insert into recent file list.\n",
+ found_ditem_path);
+
+ g_error_free (error);
+ }
+ }
+
+#ifndef USE_GTK_RECENT_MANAGER
+ g_object_unref (recent_model);
+#endif
+
+exit:
+
+ g_free (found_ditem_path);
+ g_free (found_ditem_uri);
+ g_free (found_cmd);
+}
+
static gboolean
panel_run_dialog_add_icon_idle (PanelRunDialog *dialog)
{
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org