rpms/nautilus-sendto/F-11 bug582924-long-descriptions.patch, NONE, 1.1 nautilus-sendto.spec, 1.71, 1.72

Bastien Nocera hadess at fedoraproject.org
Mon Jun 22 09:20:47 UTC 2009


Author: hadess

Update of /cvs/pkgs/rpms/nautilus-sendto/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv4062

Modified Files:
	nautilus-sendto.spec 
Added Files:
	bug582924-long-descriptions.patch 
Log Message:
* Mon Jun 22 2009 Bastien Nocera <bnocera at redhat.com> 1.1.5-2
- Fix problem with long descriptions (#507208)

bug582924-long-descriptions.patch:

--- NEW FILE bug582924-long-descriptions.patch ---
>From 9499b437dc43de780001d759db46a22503fa5020 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess at hadess.net>
Date: Tue, 19 May 2009 11:51:48 +0000
Subject: Bug 582924 – Fix UI with long plugin descriptions

- Ellipsise the plugin descriptions to avoid them resizing the
  combo box bizarrely
- Make the dialogue resizeable
- Fix plugin loading for the uninstalled case
- Use a GtkListStore instead of a GtkTreeStore
---
diff --git a/src/nautilus-sendto-command.c b/src/nautilus-sendto-command.c
index 2b396ce..8171509 100644
--- a/src/nautilus-sendto-command.c
+++ b/src/nautilus-sendto-command.c
@@ -36,9 +36,15 @@
 #define NAUTILUS_SENDTO_LAST_COMPRESS	NAUTILUS_SENDTO_GCONF"/last_compress"
 #define NAUTILUS_SENDTO_STATUS_LABEL_TIMEOUT_SECONDS 10
 
-#define UNINSTALLED_PLUGINDIR "plugins/sylpheed-claws"
+#define UNINSTALLED_PLUGINDIR "plugins/removable-devices"
 #define UNINSTALLED_SOURCE "nautilus-sendto-command.c"
 
+enum {
+	COLUMN_ICON,
+	COLUMN_DESCRIPTION,
+	NUM_COLUMNS,
+};
+
 /* Options */
 static char **filenames = NULL;
 
@@ -418,7 +424,7 @@ set_model_for_options_combobox (NS_ui *ui)
 {
 	GdkPixbuf *pixbuf;
         GtkTreeIter iter;
-        GtkTreeStore *model;
+        GtkListStore *model;
 	GtkIconTheme *it;
 	GtkCellRenderer *renderer;
 	GList *aux;
@@ -429,7 +435,7 @@ set_model_for_options_combobox (NS_ui *ui)
 
 	it = gtk_icon_theme_get_default ();
 
-	model = gtk_tree_store_new (2, GDK_TYPE_PIXBUF, G_TYPE_STRING);
+	model = gtk_list_store_new (NUM_COLUMNS, GDK_TYPE_PIXBUF, G_TYPE_STRING);
 
 	last_used = gconf_client_get_string (gconf_client,
 			NAUTILUS_SENDTO_LAST_MEDIUM, NULL);
@@ -438,10 +444,10 @@ set_model_for_options_combobox (NS_ui *ui)
 		p = (NstPlugin *) aux->data;
 		pixbuf = gtk_icon_theme_load_icon (it, p->info->icon, 16, 
 						   GTK_ICON_LOOKUP_USE_BUILTIN, NULL);
-		gtk_tree_store_append (model, &iter, NULL);
-		gtk_tree_store_set (model, &iter,
-					0, pixbuf,
-					1, _(p->info->description),
+		gtk_list_store_append (model, &iter);
+		gtk_list_store_set (model, &iter,
+					COLUMN_ICON, pixbuf,
+					COLUMN_DESCRIPTION, _(p->info->description),
 					-1);
 		if (last_used != NULL && !strcmp(last_used, p->info->id)) {
 			option = i;
@@ -459,15 +465,16 @@ set_model_for_options_combobox (NS_ui *ui)
                                     FALSE);
         gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (ui->options_combobox), 
 					renderer,
-                                        "pixbuf", 0,
+                                        "pixbuf", COLUMN_ICON,
                                         NULL);		
         renderer = gtk_cell_renderer_text_new ();
+        g_object_set (G_OBJECT (renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL);
         gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (ui->options_combobox),
                                     renderer,
                                     TRUE);
         gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (ui->options_combobox), 
 					renderer,
-                                        "text", 1,
+                                        "text", COLUMN_DESCRIPTION,
                                         NULL);
 
 	g_signal_connect (G_OBJECT (ui->options_combobox), "changed",
diff --git a/src/nautilus-sendto.glade b/src/nautilus-sendto.glade
index ee29663..6f26a6a 100644
--- a/src/nautilus-sendto.glade
+++ b/src/nautilus-sendto.glade
@@ -11,7 +11,7 @@
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
   <property name="window_position">GTK_WIN_POS_CENTER</property>
   <property name="modal">False</property>
-  <property name="resizable">False</property>
+  <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>
   <property name="decorated">True</property>
   <property name="skip_taskbar_hint">False</property>
--
cgit v0.8.2


Index: nautilus-sendto.spec
===================================================================
RCS file: /cvs/pkgs/rpms/nautilus-sendto/F-11/nautilus-sendto.spec,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -p -r1.71 -r1.72
--- nautilus-sendto.spec	5 May 2009 09:57:01 -0000	1.71
+++ nautilus-sendto.spec	22 Jun 2009 09:20:17 -0000	1.72
@@ -1,6 +1,6 @@
 Name:           nautilus-sendto
 Version:        1.1.5
-Release: 	1%{?dist}
+Release: 	2%{?dist}
 Summary:        Nautilus context menu for sending files
 
 Group:          User Interface/Desktops
@@ -8,6 +8,7 @@ License:        GPLv2+
 URL:            ftp://ftp.gnome.org/pub/gnome/sources/%{name}
 Source0:        http://download.gnome.org/sources/%{name}/1.1/%{name}-%{version}.tar.bz2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch0:		bug582924-long-descriptions.patch
 
 BuildRequires:  gtk2-devel
 BuildRequires:  libglade2-devel
@@ -41,6 +42,7 @@ additional features.
 
 %prep
 %setup -q
+%patch0 -p1 -b .long-descs
 
 %build
 %configure
@@ -95,6 +97,9 @@ fi
 %{_mandir}/man1/nautilus-sendto.1.gz
 
 %changelog
+* Mon Jun 22 2009 Bastien Nocera <bnocera at redhat.com> 1.1.5-2
+- Fix problem with long descriptions (#507208)
+
 * Tue May 05 2009 Bastien Nocera <bnocera at redhat.com> 1.1.5-1
 - Update to 1.1.5
 




More information about the fedora-extras-commits mailing list