]> git.pld-linux.org Git - packages/control-center.git/blob - control-center-report-no-theme.patch
- When the user doesnt specify a location or specify a non-existing theme location...
[packages/control-center.git] / control-center-report-no-theme.patch
1 diff -Nuard control-center-2.4.0.orig/capplets/theme-switcher/gnome-theme-installer.c control-center-2.4.0/capplets/theme-switcher/gnome-theme-installer.c
2 --- control-center-2.4.0.orig/capplets/theme-switcher/gnome-theme-installer.c   2003-01-16 08:40:29.000000000 +0100
3 +++ control-center-2.4.0/capplets/theme-switcher/gnome-theme-installer.c        2003-11-20 00:04:11.684669168 +0100
4 @@ -116,16 +116,38 @@
5         if (response_id == 0) {
6                 icon_theme = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "icon_theme"));
7                 raw = gtk_entry_get_text (GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (WID ("install_theme_picker")))));
8 -               if (raw == NULL || strlen (raw) <= 0)
9 +               if (raw == NULL || strlen (raw) <= 0)   {
10 +               GtkWidget *dialog;
11 +
12 +               dialog = gtk_message_dialog_new (NULL,
13 +                                      GTK_DIALOG_MODAL,
14 +                                      GTK_MESSAGE_ERROR,
15 +                                      GTK_BUTTONS_OK,
16 +                                      _("No theme file location specified to install"));
17 +           gtk_dialog_run (GTK_DIALOG (dialog));
18 +           gtk_widget_destroy (dialog);                        
19                         return;
20 +                       
21 +               }
22 +
23  
24                 if (strncmp (raw, "http://", 7) && strncmp (raw, "ftp://", 6) && *raw != '/')
25                         filename = gnome_file_entry_get_full_path (GNOME_FILE_ENTRY (WID ("install_theme_picker")), TRUE);
26                 else
27                         filename = g_strdup (raw);
28 -               if (filename == NULL)
29 -                       return;
30 +               if (filename == NULL)   {
31 +               GtkWidget *dialog;
32  
33 +               dialog = gtk_message_dialog_new (NULL,
34 +                                      GTK_DIALOG_MODAL,
35 +                                      GTK_MESSAGE_ERROR,
36 +                                      GTK_BUTTONS_OK,
37 +                                      _("The theme file location specified to install is invalid"));
38 +           gtk_dialog_run (GTK_DIALOG (dialog));
39 +           gtk_widget_destroy (dialog);                        
40 +                       return;
41 +               }
42 +                       
43                 src_uri = gnome_vfs_uri_new (filename);
44                 base = gnome_vfs_uri_extract_short_name (src_uri);
45                 src = g_list_append (NULL, src_uri);
This page took 0.062778 seconds and 4 git commands to generate.