[Glade-devel] FW: [patch, glade3] fix project pulldown menu.



This is a multi-part message in MIME format.

------=_NextPart_000_002A_01C32A9B.F5D859C0
Content-Type: text/plain;
        charset="US-ASCII"
Content-Transfer-Encoding: 7bit

Again with the attachment. Sorry about that.

-----Original Message-----
From: Bas Driessen [mailto:bas driessen xobas com] 
Sent: Wednesday, 4 June 2003 12:24
To: 'glade-devel lists ximian com'
Subject: [patch, glade3] fix project pulldown menu.



Hello,

Attached a patch for a small irritating (at least for me) problem. When
project names contain an  "_", this will get interpreted as a mnemonic
in the project pulldown menu entry resulting in a name which does not
make much sense. When closing a project, the entry does not get cleared
and leaves an invalid project link/entry in the pulldown menu.

Bas.

------=_NextPart_000_002A_01C32A9B.F5D859C0
Content-Type: application/octet-stream;
        name="fix_ppm.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
        filename="fix_ppm.patch"

--- ChangeLog   2003-06-04 12:12:50.000000000 +1000
+++ ChangeLog   2003-06-04 12:12:10.000000000 +1000
@@ -1,3 +1,10 @@
+2003-06-04  Bas Driessen  <bas driessen xobas com>
+
+       * src/glade-project-window.c: Change character '_' to '-' in
+       project name when adding/removing to/from the project pulldown
+       menu. This prevents the character being interpreted as a mnemonic
+       resulting in an invalid entry in the project pulldown menu.
+
 2003-05-31  Joaquin Cuenca Abela  <e98cuenc yahoo com>
 
        * src/glade-widget.c: free the resources allocated by a GladeWidget
--- glade-project-window.c      2003-06-04 11:34:21.000000000 +1000
+++ glade-project-window.c      2003-06-04 11:45:26.000000000 +1000
@@ -287,6 +287,7 @@ gpw_close_cb (void)
        }
 
        item_path = g_strdup_printf ("/Project/%s", project->name);
+       glade_util_replace (item_path, '_', '-');
        gtk_item_factory_delete_item (gpw->item_factory, item_path);
 
        for (list = project->widgets; list; list = list->next) {
@@ -1154,6 +1155,7 @@ glade_project_window_add_project (GladeP
  
        /* Add the project in the /Project menu. */
        project->entry.path = g_strdup_printf ("/Project/%s", project->name);
+       glade_util_replace (project->entry.path, '_', '-');
        project->entry.accelerator = NULL;
        project->entry.callback = glade_project_window_set_project;
        project->entry.callback_action = 0;

------=_NextPart_000_002A_01C32A9B.F5D859C0--





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]