[anjuta/gnome-2-32] Revert "libanjuta: bgo#633042 New: Sensitivity off 'ok' button on the project import dialog"
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta/gnome-2-32] Revert "libanjuta: bgo#633042 New: Sensitivity off 'ok' button on the project import dialog"
- Date: Fri, 12 Nov 2010 13:59:44 +0000 (UTC)
commit c0f541f0b804ed690f86083c02c9588fb460719f
Author: Johannes Schmid <jhs gnome org>
Date: Fri Nov 12 14:58:49 2010 +0100
Revert "libanjuta: bgo#633042 New: Sensitivity off 'ok' button on the project import dialog"
This reverts commit c0a849baa5298a8de998b394134974347144a651.
libanjuta/anjuta-plugin-manager.c | 58 ++-----------------------------------
libanjuta/anjuta-plugin-manager.h | 9 +++--
plugins/file-loader/plugin.c | 2 +-
3 files changed, 9 insertions(+), 60 deletions(-)
---
diff --git a/libanjuta/anjuta-plugin-manager.c b/libanjuta/anjuta-plugin-manager.c
index 3226496..4f59fa5 100644
--- a/libanjuta/anjuta-plugin-manager.c
+++ b/libanjuta/anjuta-plugin-manager.c
@@ -1355,7 +1355,7 @@ get_plugin_factory (AnjutaPluginManager *plugin_manager,
descs = g_list_reverse (descs);
obj = anjuta_plugin_manager_select_and_activate (plugin_manager,
_("Select a plugin"),
- _("<b>Please select a plugin to activate</b>"),
+ _("Please select a plugin to activate"),
descs);
g_list_free (descs);
}
@@ -1506,7 +1506,7 @@ anjuta_plugin_manager_get_plugin (AnjutaPluginManager *plugin_manager,
descs = g_list_reverse (descs);
obj = anjuta_plugin_manager_select_and_activate (plugin_manager,
_("Select a plugin"),
- _("<b>Please select a plugin to activate</b>"),
+ _("Please select a plugin to activate"),
descs);
g_list_free (descs);
return obj;
@@ -1871,51 +1871,6 @@ on_plugin_list_row_activated (GtkTreeView *tree_view,
gtk_dialog_response (dialog, GTK_RESPONSE_OK);
}
-
-static void
-on_plugin_list_show (GtkTreeView *view,
- GtkDialog *dialog)
-{
- GtkTreeSelection *selection;
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
-
- g_signal_emit_by_name (G_OBJECT (selection), "changed", GTK_DIALOG(dialog), NULL);
-}
-
-
-static void
-on_plugin_list_selection_changed (GtkTreeSelection *tree_selection,
- GtkDialog *dialog)
-{
- GtkContainer *action_area;
- GList *list;
- GtkButton *bt = NULL;
-
- action_area = (GtkContainer *) dialog->action_area;
- list = gtk_container_get_children (action_area);
- for (; list; list = list->next) {
- bt = list->data;
- if (!strcmp("gtk-ok", gtk_button_get_label (bt)))
- break;
- }
- if (bt && gtk_tree_selection_get_selected (tree_selection, NULL, NULL))
- gtk_widget_set_sensitive ((GtkWidget *) bt, TRUE);
- else
- gtk_widget_set_sensitive ((GtkWidget *) bt, FALSE);
- g_list_free(list);
-}
-
-/*
- * anjuta_plugin_manager_select:
- * @plugin_manager: #AnjutaPluginManager object
- * @title: Title of the dialog
- * @description: label shown on the dialog
- * @plugin_descriptions: List of #AnjutaPluginDescription
- *
- * Show a dialog where the user can choose between the given plugins
- *
- * Returns: The chosen plugin description
- */
AnjutaPluginDescription *
anjuta_plugin_manager_select (AnjutaPluginManager *plugin_manager,
gchar *title, gchar *description,
@@ -1955,6 +1910,7 @@ anjuta_plugin_manager_select (AnjutaPluginManager *plugin_manager,
GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
NULL);
+ gtk_widget_set_size_request (dlg, 400, 300);
gtk_window_set_default_size (GTK_WINDOW (dlg), 400, 300);
label = gtk_label_new (description);
@@ -2002,14 +1958,6 @@ anjuta_plugin_manager_select (AnjutaPluginManager *plugin_manager,
g_signal_connect (view, "row-activated",
G_CALLBACK (on_plugin_list_row_activated),
GTK_DIALOG(dlg));
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
- g_signal_connect(selection, "changed",
- G_CALLBACK(on_plugin_list_selection_changed),
- GTK_DIALOG(dlg));
- g_signal_connect(view, "focus",
- G_CALLBACK(on_plugin_list_show),
- GTK_DIALOG(dlg));
-
remember_checkbox =
gtk_check_button_new_with_label (_("Remember this selection"));
gtk_container_set_border_width (GTK_CONTAINER (remember_checkbox), 10);
diff --git a/libanjuta/anjuta-plugin-manager.h b/libanjuta/anjuta-plugin-manager.h
index 422da50..08d95ce 100644
--- a/libanjuta/anjuta-plugin-manager.h
+++ b/libanjuta/anjuta-plugin-manager.h
@@ -111,10 +111,11 @@ AnjutaPluginDescription* anjuta_plugin_manager_select (AnjutaPluginManager *plug
gchar *title, gchar *description,
GList *plugin_descriptions);
-
-GObject* anjuta_plugin_manager_select_and_activate (AnjutaPluginManager *plugin_manager,
- gchar *title, gchar *description,
- GList *plugin_descriptions);
+/* Returns the plugin that has been selected and activated */
+GObject* anjuta_plugin_manager_select_and_activate (AnjutaPluginManager *plugin_manager,
+ gchar *title,
+ gchar *description,
+ GList *plugin_descriptions);
void anjuta_plugin_manager_activate_plugins (AnjutaPluginManager *plugin_manager,
GList *plugin_descs);
diff --git a/plugins/file-loader/plugin.c b/plugins/file-loader/plugin.c
index 6580073..9679e5b 100644
--- a/plugins/file-loader/plugin.c
+++ b/plugins/file-loader/plugin.c
@@ -1438,7 +1438,7 @@ iloader_load (IAnjutaFileLoader *loader, GFile* file,
basename);
plugin =
anjuta_plugin_manager_select_and_activate (plugin_manager,
- _("<b>Open With</b>"),
+ _("Open With"),
message,
plugin_descs);
g_free (basename);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]