After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 80429 - Shortening the `Open with...' buttons in the sidebar
Shortening the `Open with...' buttons in the sidebar
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: [obsolete] Sidebar
0.x.x [obsolete]
Other Linux
: Normal enhancement
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 46882 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-05-01 03:25 UTC by Lars Weber
Modified: 2005-07-15 13:50 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
patch using ellipsis (1.48 KB, patch)
2005-07-14 17:18 UTC, Vincent Noel
none Details | Review

Description Lars Weber 2002-05-01 03:25:43 UTC
To make the `Open with <app>' buttons in the sidebar shorter (as they are
often wider than the sidebar itself) one option would be to remove the
`Open with ' preamble from the individual buttons and display it as a
header instead.

The following patch basically does this already
(http://me.in-berlin.de/~lars/cruft/open-with.png) but at least one issue
still needs to be addressed: the label doesn't change the color like the
other text in the sidebar and thus becomes unreadable on a dark background.

Index: src/nautilus-sidebar.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-sidebar.c,v
retrieving revision 1.210
diff -p -u -r1.210 nautilus-sidebar.c
--- src/nautilus-sidebar.c	2002/04/05 15:34:45	1.210
+++ src/nautilus-sidebar.c	2002/05/01 02:49:25
@@ -1352,18 +1352,23 @@ add_command_buttons (NautilusSidebar *si
 {
 	char *id_string, *temp_str, *file_path;
 	GList *p;
+
GtkWidget *header_label;
 	GtkWidget *temp_button;
 	GnomeVFSMimeApplication *application;
 
-
/* There's always at least the "Open with..." button */
+
/* There's always at least the "An Application..." button */
 	sidebar->details->has_buttons = TRUE;
 
+
header_label = gtk_label_new (_("Open with:"));
+
gtk_widget_show(header_label);
+
gtk_misc_set_alignment(GTK_MISC (header_label), 0.5, 0.5);
+
gtk_box_pack_start (GTK_BOX (sidebar->details->button_box),
+
		    header_label, FALSE, FALSE, 0);
+
 	for (p = application_list; p != NULL; p = p->next) {
 	        application = p->data;	        
 
-
	temp_str = g_strdup_printf (_("Open with %s"), application->name);
-
        temp_button = gtk_button_new_with_label (temp_str);
-
	g_free (temp_str);
+
        temp_button = gtk_button_new_with_label (application->name);
 
	gtk_box_pack_start (GTK_BOX (sidebar->details->button_box), 
 
			    temp_button, 
 
			    FALSE, FALSE, 
@@ -1390,7 +1395,9 @@ add_command_buttons (NautilusSidebar *si
 	}
 
 	/* Catch-all button after all the others. */
-
temp_button = gtk_button_new_with_label (_("Open with..."));
+
temp_button = gtk_button_new_with_label (application_list == NULL
+
					 ? _("An Application...")
+
					 : _("Other Application..."));
 	g_signal_connect (temp_button, "clicked",
 
		  G_CALLBACK (open_with_callback), NULL);
 	g_object_set_data (G_OBJECT (temp_button), "user_data", sidebar);
Comment 1 Dave Bordoley [Not Reading Bug Mail] 2002-05-09 07:12:35 UTC
you really need to email the nautilus-list@gnome.org about patches or
they will never be applied.
Comment 2 Lars Weber 2002-05-09 16:53:28 UTC
Hmmm, I already did so a few days before filing the bug:
  <87g01gx69g.fsf@lars.in-berlin.de>
  <874rhwwx2r.fsf@lars.in-berlin.de>

Except for Alex Larson (who said that it looked like a possible
solution; see
<Pine.LNX.4.44.0204271928060.8973-100000@devserv.devel.redhat.com>)
nobody said something, so I filed this as a bug to make sure it isn't
completely forgotten.

And as I said: the patch still needs a few changes before it should
actually be applied.
Comment 3 Dave Bordoley [Not Reading Bug Mail] 2002-05-13 14:55:45 UTC
*** Bug 46882 has been marked as a duplicate of this bug. ***
Comment 4 Luis Villa 2002-05-13 15:32:44 UTC
Adding 'usability' because sometimes these flow way over making them
hard to read.
Comment 5 Vincent Noel 2005-07-14 17:18:25 UTC
Created attachment 49181 [details] [review]
patch using ellipsis

The original patch is somewhat outdated (more than 3 years old), so here is a
new one that makes things, if not ideal, at least a little better.
Comment 6 Vincent Noel 2005-07-15 13:50:52 UTC
This last patch has been committed.