pidgin/pidgin

Wire up the rest of the dialog to stubs

16 months ago, Gary Kramlich
1af60f2ac6b6
Parents 006fdc542235
Children e34d79e34f9f
Wire up the rest of the dialog to stubs
--- a/pidgin/pidginpluginsdialog.c Thu Nov 07 23:13:20 2019 -0600
+++ b/pidgin/pidginpluginsdialog.c Mon Nov 11 22:20:27 2019 -0600
@@ -31,6 +31,7 @@
struct _PidginPluginsDialog {
GtkDialog parent;
+ GtkWidget *configure_plugin_button;
GtkWidget *close_button;
GtkWidget *plugin_info;
@@ -40,6 +41,11 @@
/******************************************************************************
* Helpers
*****************************************************************************/
+static gboolean
+pidgin_plugins_dialog_plugin_has_config(GPluginPlugin *plugin) {
+ return FALSE;
+}
+
/******************************************************************************
* Callbacks
@@ -66,6 +72,15 @@
GPLUGIN_GTK_PLUGIN_INFO(dialog->plugin_info),
plugin
);
+
+ gtk_widget_set_sensitive(
+ GTK_WIDGET(dialog->configure_plugin_button),
+ pidgin_plugins_dialog_plugin_has_config(plugin)
+ );
+}
+
+static void
+pidgin_plugins_dialog_config_plugin_cb(GtkWidget *button, gpointer data) {
}
/******************************************************************************
@@ -82,11 +97,13 @@
"/im/pidgin/Pidgin/Plugins/dialog.ui"
);
+ gtk_widget_class_bind_template_child(widget_class, PidginPluginsDialog, configure_plugin_button);
gtk_widget_class_bind_template_child(widget_class, PidginPluginsDialog, close_button);
gtk_widget_class_bind_template_child(widget_class, PidginPluginsDialog, plugin_info);
gtk_widget_class_bind_template_child(widget_class, PidginPluginsDialog, plugin_store);
gtk_widget_class_bind_template_callback(widget_class, pidgin_plugins_dialog_selection_cb);
+ gtk_widget_class_bind_template_callback(widget_class, pidgin_plugins_dialog_config_plugin_cb);
}
static void
--- a/pidgin/resources/Plugins/dialog.ui Thu Nov 07 23:13:20 2019 -0600
+++ b/pidgin/resources/Plugins/dialog.ui Mon Nov 11 22:20:27 2019 -0600
@@ -26,8 +26,10 @@
<object class="GtkButton" id="configure_plugin_button">
<property name="label" translatable="yes">Configure Plugin</property>
<property name="visible">True</property>
+ <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <signal name="clicked" handler="pidgin_plugins_dialog_config_plugin_cb" object="PidginPluginsDialog" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>