Exemplo n.º 1
0
static void
on_settings_changed (GSettings *settings, gchar *key, gpointer user_data)
{
    NemoActionConfigWidget *w = NEMO_ACTION_CONFIG_WIDGET (user_data);

    refresh_widget (w);
}
Exemplo n.º 2
0
static void
on_settings_changed (GSettings *settings, gchar *key, gpointer user_data)
{
    NemoScriptConfigWidget *w = NEMO_SCRIPT_CONFIG_WIDGET (user_data);

    refresh_widget (w);
}
Exemplo n.º 3
0
static void
on_settings_changed (GSettings *settings, gchar *key, gpointer user_data)
{
    NemoExtensionConfigWidget *w = NEMO_EXTENSION_CONFIG_WIDGET (user_data);

    update_restart_visiblity (w);
    refresh_widget (w);
}
Exemplo n.º 4
0
static void
on_dir_changed (GFileMonitor     *monitor,
                GFile            *file,
                GFile            *other_file,
                GFileMonitorEvent event_type,
                gpointer          user_data)
{
    NemoActionConfigWidget *widget = NEMO_ACTION_CONFIG_WIDGET (user_data);

    refresh_widget (widget);
}
Exemplo n.º 5
0
static void
nemo_extension_config_widget_init (NemoExtensionConfigWidget *self)
{
    self->current_extensions = NULL;
    self->initial_extension_ids = NULL;

    self->bl_handler = g_signal_connect (nemo_plugin_preferences,
    		                             "changed::" NEMO_PLUGIN_PREFERENCES_DISABLED_EXTENSIONS,
                                         G_CALLBACK (on_settings_changed), self);

    GtkWidget *label = nemo_config_base_widget_get_label (NEMO_CONFIG_BASE_WIDGET (self));

    gchar *title = g_strdup (_("Extensions"));
    gchar *markup = g_strdup_printf ("<b>%s</b>", title);

    gtk_label_set_markup (GTK_LABEL (label), markup);

    g_free (title);
    g_free (markup);

    self->restart_button = gtk_button_new_with_label (_("Extensions changed.  Restart required."));

    GtkWidget *bb = nemo_config_base_widget_get_buttonbox (NEMO_CONFIG_BASE_WIDGET (self));
    gtk_box_pack_end (GTK_BOX (bb),
                      self->restart_button,
                      FALSE, FALSE, 0);

    g_signal_connect (self->restart_button, "clicked", G_CALLBACK (on_restart_clicked), self);
    gtk_widget_set_no_show_all (self->restart_button, TRUE);

    g_signal_connect (nemo_config_base_widget_get_enable_button (NEMO_CONFIG_BASE_WIDGET (self)), "clicked",
                                                                 G_CALLBACK (on_enable_clicked), self);

    g_signal_connect (nemo_config_base_widget_get_disable_button (NEMO_CONFIG_BASE_WIDGET (self)), "clicked",
                                                                  G_CALLBACK (on_disable_clicked), self);

    g_signal_connect (NEMO_CONFIG_BASE_WIDGET (self)->listbox, "row-activated", G_CALLBACK (on_row_activated), self);

    gchar **init_settings = g_settings_get_strv (nemo_plugin_preferences,
    		                                     NEMO_PLUGIN_PREFERENCES_DISABLED_EXTENSIONS);
    guint i;
    for (i = 0; i < g_strv_length (init_settings); i++) {
        self->initial_extension_ids = g_list_append (self->initial_extension_ids, g_strdup (init_settings[i]));
    }

    g_strfreev (init_settings);

    refresh_widget (self);
}
Exemplo n.º 6
0
static void
nemo_action_config_widget_init (NemoActionConfigWidget *self)
{
    self->actions = NULL;

    self->bl_handler = g_signal_connect (nemo_plugin_preferences, 
                                         "changed::" NEMO_PLUGIN_PREFERENCES_DISABLED_ACTIONS,
                                         G_CALLBACK (on_settings_changed), self);

    GtkWidget *label = nemo_config_base_widget_get_label (NEMO_CONFIG_BASE_WIDGET (self));

    gchar *title = g_strdup (_("Actions"));
    gchar *markup = g_strdup_printf ("<b>%s</b>", title);

    gtk_label_set_markup (GTK_LABEL (label), markup);

    g_free (title);
    g_free (markup);

    GtkWidget *widget = gtk_button_new_from_icon_name ("folder", GTK_ICON_SIZE_BUTTON);

    GtkWidget *bb = nemo_config_base_widget_get_buttonbox (NEMO_CONFIG_BASE_WIDGET (self));
    gtk_box_pack_end (GTK_BOX (bb),
                      widget,
                      FALSE, FALSE, 0);
    gtk_widget_show (widget);

    g_signal_connect (widget, "clicked", G_CALLBACK (on_open_folder_clicked), self);

    g_signal_connect (nemo_config_base_widget_get_enable_button (NEMO_CONFIG_BASE_WIDGET (self)), "clicked",
                                                                 G_CALLBACK (on_enable_clicked), self);

    g_signal_connect (nemo_config_base_widget_get_disable_button (NEMO_CONFIG_BASE_WIDGET (self)), "clicked",
                                                                  G_CALLBACK (on_disable_clicked), self);

    g_signal_connect (NEMO_CONFIG_BASE_WIDGET (self)->listbox, "row-activated", G_CALLBACK (on_row_activated), self);

    refresh_widget (self);

    setup_dir_monitors (self);
}