~carifio/seahorse/seahorse-remove-broken-help-buttons

« back to all changes in this revision

Viewing changes to src/seahorse-viewer.c

ImportĀ upstreamĀ versionĀ 2.28.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
        }
99
99
}
100
100
 
101
 
static void 
 
101
G_MODULE_EXPORT void
102
102
on_app_preferences (GtkAction* action, SeahorseViewer* self) 
103
103
{
104
104
        g_return_if_fail (SEAHORSE_IS_VIEWER (self));
195
195
        { "edit-menu", NULL, N_("_Edit") },
196
196
        { "view-menu", NULL, N_("_View") },
197
197
        { "help-menu", NULL, N_("_Help") },
198
 
#ifdef  WITH_KEYSERVER || WITH_SHARING
 
198
#if defined (WITH_KEYSERVER) || defined (WITH_SHARING)
199
199
        { "app-preferences", GTK_STOCK_PREFERENCES, N_("Prefere_nces"), NULL,
200
200
          N_("Change preferences for this program"), G_CALLBACK (on_app_preferences) },
201
201
#endif
443
443
        GList *objects = NULL;
444
444
        GList *all_objects = NULL;
445
445
        GList *l;
446
 
        guint num;
447
446
 
448
447
        g_return_if_fail (SEAHORSE_IS_VIEWER (self));
449
448
        g_return_if_fail (GTK_IS_ACTION (action));
457
456
                SeahorseObject* object = l->data;
458
457
                
459
458
                if (seahorse_object_get_usage (object) == SEAHORSE_USAGE_PRIVATE_KEY) {
460
 
                        gchar* prompt = NULL;
461
 
                        if (num == 1)
462
 
                                prompt = g_strdup_printf (_("%s is a private key. Are you sure you want to proceed?"), 
463
 
                                                          seahorse_object_get_label (object));
464
 
                        else
465
 
                                prompt = g_strdup (_("One or more of the deleted keys are private keys. Are you sure you want to proceed?"));
466
 
                                                
 
459
                        gchar* prompt = g_strdup_printf (_("%s is a private key. Are you sure you want to proceed?"), 
 
460
                                                         seahorse_object_get_label (object));
467
461
                        if (!seahorse_util_prompt_delete (prompt, GTK_WIDGET (seahorse_view_get_window (SEAHORSE_VIEW (self))))) {
468
462
                                g_free (prompt);
469
463
                                g_list_free (objects);
692
686
 
693
687
                /* The widgts get added in an idle loop later */
694
688
                name = seahorse_widget_get_name (SEAHORSE_WIDGET (self));
695
 
                path = g_strdup_printf ("%sseahorse-%s.ui", SEAHORSE_GLADEDIR, name);
 
689
                path = g_strdup_printf ("%sseahorse-%s.ui", SEAHORSE_UIDIR, name);
696
690
                if (!gtk_ui_manager_add_ui_from_file (pv->ui_manager, path, &error)) {
697
691
                        g_warning ("couldn't load ui description for '%s': %s", name, error->message);
698
692
                        g_clear_error (&error);