[gtranslator/dl-autoload-languages] Auto-load languages and modules from Damed Lies
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator/dl-autoload-languages] Auto-load languages and modules from Damed Lies
- Date: Mon, 1 Apr 2019 10:39:28 +0000 (UTC)
commit 918b48a77b48c1d745e78806f5274cbef1118af6
Author: Daniel Mustieles <daniel mustieles gmail com>
Date: Fri Mar 29 12:40:26 2019 +0100
Auto-load languages and modules from Damed Lies
Remove the button and load languages and modules from DL. "Loading..." label here is useless, since load
is done automatically
src/gtr-dl-teams.c | 13 +++++--------
src/gtr-dl-teams.ui | 11 -----------
2 files changed, 5 insertions(+), 19 deletions(-)
---
diff --git a/src/gtr-dl-teams.c b/src/gtr-dl-teams.c
index ff4b9041..279e83d5 100644
--- a/src/gtr-dl-teams.c
+++ b/src/gtr-dl-teams.c
@@ -37,7 +37,6 @@ typedef struct
GtkWidget *main_box;
GtkWidget *select_box;
GtkWidget *open_button;
- GtkWidget *dl_button;
GtkWidget *load_button;
GtkWidget *stats_label;
GtkWidget *file_label;
@@ -294,8 +293,10 @@ gtr_dl_teams_parse_modules_json (GObject *object,
}
static void
-gtr_dl_teams_load_json (GtkButton *btn,
+/*gtr_dl_teams_load_json (GtkButton *btn,
GtrDlTeams *self)
+*/
+gtr_dl_teams_load_json (GtrDlTeams *self)
{
/* Get team list JSON from DL */
g_autoptr(SoupSession) session = soup_session_new ();
@@ -573,7 +574,6 @@ gtr_dl_teams_class_init (GtrDlTeamsClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, GtrDlTeams, instructions);
gtk_widget_class_bind_template_child_private (widget_class, GtrDlTeams, open_button);
- gtk_widget_class_bind_template_child_private (widget_class, GtrDlTeams, dl_button);
}
@@ -635,11 +635,8 @@ gtr_dl_teams_init (GtrDlTeams *self)
gtk_container_add (GTK_CONTAINER (priv->select_box), priv->branches_combobox);
gtk_widget_hide (priv->branches_combobox);
- /* Load teams and modules on click */
- g_signal_connect (priv->dl_button,
- "clicked",
- G_CALLBACK (gtr_dl_teams_load_json),
- self);
+ /* Load teams and modules automatically */
+ gtr_dl_teams_load_json (self);
/* Connect "changed" to all combo boxes */
g_signal_connect (priv->teams_combobox,
diff --git a/src/gtr-dl-teams.ui b/src/gtr-dl-teams.ui
index bb4ea3a4..254699ce 100644
--- a/src/gtr-dl-teams.ui
+++ b/src/gtr-dl-teams.ui
@@ -28,17 +28,6 @@
<property name="position">0</property>
</packing>
</child>
- <child>
- <object class="GtkButton" id="dl_button">
- <property name="label" translatable="yes">Click to load teams and modules from Damned
Lies</property>
- <property name="visible">true</property>
- <property name="expand">False</property>
- </object>
- <packing>
- <property name="pack-type">start</property>
- <property name="position">1</property>
- </packing>
- </child>
<child>
<object class="GtkBox" id="select_box">
<property name="margin_start">0</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]