diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2000-08-04 04:53:14 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2000-08-04 04:53:14 +0800 |
commit | b83eccac16d2cf08a97c6c7c2b046d17565cefd1 (patch) | |
tree | 5d0b691724a2872b8bbc6445caf6ca6058c74485 | |
parent | 36109c82b3480eb14f8ecd07b5fa14f45de7fbbb (diff) | |
download | gsoc2013-evolution-b83eccac16d2cf08a97c6c7c2b046d17565cefd1.tar gsoc2013-evolution-b83eccac16d2cf08a97c6c7c2b046d17565cefd1.tar.gz gsoc2013-evolution-b83eccac16d2cf08a97c6c7c2b046d17565cefd1.tar.bz2 gsoc2013-evolution-b83eccac16d2cf08a97c6c7c2b046d17565cefd1.tar.lz gsoc2013-evolution-b83eccac16d2cf08a97c6c7c2b046d17565cefd1.tar.xz gsoc2013-evolution-b83eccac16d2cf08a97c6c7c2b046d17565cefd1.tar.zst gsoc2013-evolution-b83eccac16d2cf08a97c6c7c2b046d17565cefd1.zip |
Make the filter dialog display only the name of the folder, not the
whole URI.
svn path=/trunk/; revision=4516
-rw-r--r-- | filter/ChangeLog | 6 | ||||
-rw-r--r-- | filter/filter-folder.c | 33 |
2 files changed, 21 insertions, 18 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog index 16df1bbefb..f99e3199d4 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,9 @@ +2000-08-03 Ettore Perazzoli <ettore@helixcode.com> + + * filter-folder.c (button_clicked): Use the base name of the + Evoluton URI for the button's label. + (get_widget): Likewise. + 2000-08-01 Not Zed <NotZed@HelixCode.com> * vfolder-editor.c (rule_add): Oops, create a vfolder_rule when we diff --git a/filter/filter-folder.c b/filter/filter-folder.c index b5be1be8a9..1fcab58599 100644 --- a/filter/filter-folder.c +++ b/filter/filter-folder.c @@ -175,31 +175,28 @@ static void button_clicked(GtkButton *button, FilterFolder *ff) { #ifdef SHELL const char *allowed_types[] = { "mail", NULL }; - char *def, *uri, *str; + char *def, *physical_uri, *evolution_uri, *str; + + def = ff->uri ? ff->uri : ""; - def = ff->uri?ff->uri:""; evolution_shell_client_user_select_folder (global_shell_client, _("Select Folder"), - def, allowed_types, NULL, &uri); + def, allowed_types, + &evolution_uri, + &physical_uri); - if (uri != NULL && uri[0] != '\0') { + if (physical_uri != NULL && physical_uri[0] != '\0') { g_free(ff->uri); - g_free(ff->name); - ff->uri = uri; + ff->uri = physical_uri; - str = strstr(uri, "//"); - if (str) - str = strchr(str+2, '/'); - if (str) - str++; - else - str = uri; + g_free(ff->name); + ff->name = g_strdup(g_basename (evolution_uri)); - ff->name = g_strdup(str); gtk_label_set_text((GtkLabel *)GTK_BIN(button)->child, ff->name); } else { - g_free(uri); + g_free (physical_uri); } + g_free (evolution_uri); #else GnomeDialog *gd; GtkEntry *entry; @@ -244,10 +241,10 @@ static GtkWidget *get_widget(FilterElement *fe) char *name; if (ff->name && ff->name[0]) - name = ff->name; + label = (GtkLabel *)gtk_label_new(g_basename (ff->name)); else - name = "<click to select folder>"; - label = (GtkLabel *)gtk_label_new(name); + label = (GtkLabel *)gtk_label_new(_("<click here to select a folder>")); + button = (GtkButton *)gtk_button_new(); gtk_container_add((GtkContainer *)button, (GtkWidget *)label); gtk_widget_show((GtkWidget *)button); |