[rhythmbox] audioscrobbler: stop using GtkBuilder signal connections
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] audioscrobbler: stop using GtkBuilder signal connections
- Date: Sun, 29 Mar 2015 21:58:57 +0000 (UTC)
commit 896db560e194f7b537e3841896ee332bb86b7f9e
Author: Jonathan Matthew <jonathan d14n org>
Date: Mon Mar 30 07:55:31 2015 +1000
audioscrobbler: stop using GtkBuilder signal connections
This never really bought us much, and with recent changes to libpeas, it
doesn't even work any more.
https://bugzilla.gnome.org/show_bug.cgi?id=746975
plugins/audioscrobbler/audioscrobbler-profile.ui | 3 ---
.../rb-audioscrobbler-profile-page.c | 15 +++++++++++----
2 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/plugins/audioscrobbler/audioscrobbler-profile.ui
b/plugins/audioscrobbler/audioscrobbler-profile.ui
index 7d382cb..c399d2e 100644
--- a/plugins/audioscrobbler/audioscrobbler-profile.ui
+++ b/plugins/audioscrobbler/audioscrobbler-profile.ui
@@ -80,7 +80,6 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">half</property>
- <signal name="clicked" handler="logout_button_clicked_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -153,7 +152,6 @@
<property name="receives_default">False</property>
<property name="xalign">0.5</property>
<property name="draw_indicator">True</property>
- <signal name="toggled" handler="scrobbling_enabled_check_toggled_cb"
swapped="no"/>
</object>
</child>
</object>
@@ -414,7 +412,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <signal name="clicked" handler="station_creator_button_clicked_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
diff --git a/plugins/audioscrobbler/rb-audioscrobbler-profile-page.c
b/plugins/audioscrobbler/rb-audioscrobbler-profile-page.c
index 2effccd..10a68d5 100644
--- a/plugins/audioscrobbler/rb-audioscrobbler-profile-page.c
+++ b/plugins/audioscrobbler/rb-audioscrobbler-profile-page.c
@@ -138,7 +138,7 @@ static void init_actions (RBAudioscrobblerProfilePage *page);
static void login_bar_response_cb (GtkInfoBar *info_bar,
gint response_id,
RBAudioscrobblerProfilePage *page);
-void logout_button_clicked_cb (GtkButton *button, RBAudioscrobblerProfilePage *page);
+static void logout_button_clicked_cb (GtkButton *button, RBAudioscrobblerProfilePage *page);
static void login_status_change_cb (RBAudioscrobblerAccount *account,
RBAudioscrobblerAccountLoginStatus status,
RBAudioscrobblerProfilePage *page);
@@ -172,7 +172,7 @@ static void refresh_profile_action_cb (GSimpleAction *, GVariant *, gpointer);
static void download_track_batch_complete_cb (RBTrackTransferBatch *batch, RBAudioscrobblerProfilePage
*page);
/* radio station creation/deletion */
-void station_creator_button_clicked_cb (GtkButton *button, RBAudioscrobblerProfilePage *page);
+static void station_creator_button_clicked_cb (GtkButton *button, RBAudioscrobblerProfilePage *page);
static void load_radio_stations (RBAudioscrobblerProfilePage *page);
static void save_radio_stations (RBAudioscrobblerProfilePage *page);
static RBSource *add_radio_station (RBAudioscrobblerProfilePage *page,
@@ -529,6 +529,7 @@ init_profile_ui (RBAudioscrobblerProfilePage *page)
char *builder_file;
GtkBuilder *builder;
GtkWidget *combo_container;
+ GtkWidget *w;
int i;
g_object_get (page, "plugin", &plugin, NULL);
@@ -544,8 +545,12 @@ init_profile_ui (RBAudioscrobblerProfilePage *page)
page->priv->username_label = GTK_WIDGET (gtk_builder_get_object (builder, "username_label"));
page->priv->playcount_label = GTK_WIDGET (gtk_builder_get_object (builder, "playcount_label"));
page->priv->scrobbling_enabled_check = GTK_WIDGET (gtk_builder_get_object (builder,
"scrobbling_enabled_check"));
+ g_signal_connect (page->priv->scrobbling_enabled_check, "toggled", G_CALLBACK
(scrobbling_enabled_check_toggled_cb), page);
page->priv->view_profile_link = GTK_WIDGET (gtk_builder_get_object (builder, "view_profile_link"));
+ w = GTK_WIDGET (gtk_builder_get_object (builder, "logout_button"));
+ g_signal_connect (w, "clicked", G_CALLBACK (logout_button_clicked_cb), page);
+
/* scrobbler statistics */
page->priv->scrobbler_status_msg_label = GTK_WIDGET (gtk_builder_get_object (builder,
"scrobbler_status_msg_label"));
page->priv->scrobbler_queue_count_label = GTK_WIDGET (gtk_builder_get_object (builder,
"scrobbler_queue_count_label"));
@@ -553,6 +558,8 @@ init_profile_ui (RBAudioscrobblerProfilePage *page)
page->priv->scrobbler_submit_time_label = GTK_WIDGET (gtk_builder_get_object (builder,
"scrobbler_submit_time_label"));
/* station creator */
+ w = GTK_WIDGET (gtk_builder_get_object (builder, "station_creator_button"));
+ g_signal_connect (w, "clicked", G_CALLBACK (station_creator_button_clicked_cb), page);
page->priv->station_creator_arg_entry = GTK_WIDGET (gtk_builder_get_object (builder,
"station_creator_arg_entry"));
combo_container = GTK_WIDGET (gtk_builder_get_object (builder, "station_creator_combo_container"));
page->priv->station_creator_type_combo = gtk_combo_box_text_new ();
@@ -719,7 +726,7 @@ login_bar_response_cb (GtkInfoBar *info_bar,
}
}
-void
+static void
logout_button_clicked_cb (GtkButton *button,
RBAudioscrobblerProfilePage *page)
{
@@ -1123,7 +1130,7 @@ refresh_profile_action_cb (GSimpleAction *action, GVariant *parameters, gpointer
rb_audioscrobbler_user_force_update (page->priv->user);
}
-void
+static void
station_creator_button_clicked_cb (GtkButton *button,
RBAudioscrobblerProfilePage *page)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]