[gnome-software] Rename gs-sources-dialog* to gs-repos-dialog*
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Rename gs-sources-dialog* to gs-repos-dialog*
- Date: Wed, 14 Feb 2018 23:52:42 +0000 (UTC)
commit c1273c644a305946dd5d46fd9287ba216d7e6b9f
Author: Kalev Lember <klember redhat com>
Date: Fri Feb 9 13:16:07 2018 +0100
Rename gs-sources-dialog* to gs-repos-dialog*
The only changes here are file renames and mechanical code rename; no
string or functional changes.
po/POTFILES.in | 4 +-
src/gnome-software.gresource.xml | 4 +-
...-sources-dialog-row.c => gs-repos-dialog-row.c} | 62 +++++-----
...-sources-dialog-row.h => gs-repos-dialog-row.h} | 24 ++--
...ources-dialog-row.ui => gs-repos-dialog-row.ui} | 2 +-
src/{gs-sources-dialog.c => gs-repos-dialog.c} | 136 ++++++++++-----------
src/{gs-sources-dialog.h => gs-repos-dialog.h} | 12 +-
src/{gs-sources-dialog.ui => gs-repos-dialog.ui} | 4 +-
src/gs-shell.c | 4 +-
src/meson.build | 4 +-
10 files changed, 128 insertions(+), 128 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 1a0ddb6a..5e439a0a 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -47,6 +47,8 @@ src/gs-popular-tile.ui
lib/gs-price.c
src/gs-removal-dialog.c
src/gs-removal-dialog.ui
+src/gs-repos-dialog.c
+src/gs-repos-dialog.ui
src/gs-review-dialog.c
src/gs-review-dialog.ui
src/gs-review-histogram.ui
@@ -56,8 +58,6 @@ src/gs-screenshot-image.c
src/gs-search-page.c
src/gs-search-page.ui
src/gs-shell.c
-src/gs-sources-dialog.c
-src/gs-sources-dialog.ui
src/gs-star-widget.ui
src/gs-summary-tile.c
src/gs-summary-tile.ui
diff --git a/src/gnome-software.gresource.xml b/src/gnome-software.gresource.xml
index 30e252cf..cea8f77b 100644
--- a/src/gnome-software.gresource.xml
+++ b/src/gnome-software.gresource.xml
@@ -21,13 +21,13 @@
<file preprocess="xml-stripblanks">gs-overview-page.ui</file>
<file preprocess="xml-stripblanks">gs-popular-tile.ui</file>
<file preprocess="xml-stripblanks">gs-removal-dialog.ui</file>
+ <file preprocess="xml-stripblanks">gs-repos-dialog-row.ui</file>
+ <file preprocess="xml-stripblanks">gs-repos-dialog.ui</file>
<file preprocess="xml-stripblanks">gs-review-dialog.ui</file>
<file preprocess="xml-stripblanks">gs-review-histogram.ui</file>
<file preprocess="xml-stripblanks">gs-review-row.ui</file>
<file preprocess="xml-stripblanks">gs-screenshot-image.ui</file>
<file preprocess="xml-stripblanks">gs-search-page.ui</file>
- <file preprocess="xml-stripblanks">gs-sources-dialog-row.ui</file>
- <file preprocess="xml-stripblanks">gs-sources-dialog.ui</file>
<file preprocess="xml-stripblanks">gs-star-widget.ui</file>
<file preprocess="xml-stripblanks">gs-summary-tile.ui</file>
<file preprocess="xml-stripblanks">gs-update-dialog.ui</file>
diff --git a/src/gs-sources-dialog-row.c b/src/gs-repos-dialog-row.c
similarity index 60%
rename from src/gs-sources-dialog-row.c
rename to src/gs-repos-dialog-row.c
index 6b41d3b6..d48b5522 100644
--- a/src/gs-sources-dialog-row.c
+++ b/src/gs-repos-dialog-row.c
@@ -21,9 +21,9 @@
#include "config.h"
-#include "gs-sources-dialog-row.h"
+#include "gs-repos-dialog-row.h"
-struct _GsSourcesDialogRow
+struct _GsReposDialogRow
{
GtkListBoxRow parent_instance;
@@ -39,31 +39,31 @@ enum {
PROP_LAST
};
-G_DEFINE_TYPE (GsSourcesDialogRow, gs_sources_dialog_row, GTK_TYPE_LIST_BOX_ROW)
+G_DEFINE_TYPE (GsReposDialogRow, gs_repos_dialog_row, GTK_TYPE_LIST_BOX_ROW)
void
-gs_sources_dialog_row_set_switch_enabled (GsSourcesDialogRow *row,
- gboolean switch_enabled)
+gs_repos_dialog_row_set_switch_enabled (GsReposDialogRow *row,
+ gboolean switch_enabled)
{
gtk_widget_set_visible (row->active_switch, switch_enabled);
}
void
-gs_sources_dialog_row_set_switch_active (GsSourcesDialogRow *row,
- gboolean switch_active)
+gs_repos_dialog_row_set_switch_active (GsReposDialogRow *row,
+ gboolean switch_active)
{
gtk_switch_set_active (GTK_SWITCH (row->active_switch), switch_active);
}
void
-gs_sources_dialog_row_set_name (GsSourcesDialogRow *row, const gchar *name)
+gs_repos_dialog_row_set_name (GsReposDialogRow *row, const gchar *name)
{
gtk_label_set_text (GTK_LABEL (row->name_label), name);
gtk_widget_set_visible (row->name_label, name != NULL);
}
void
-gs_sources_dialog_row_set_comment (GsSourcesDialogRow *row, const gchar *comment)
+gs_repos_dialog_row_set_comment (GsReposDialogRow *row, const gchar *comment)
{
gtk_label_set_markup (GTK_LABEL (row->comment_label), comment);
gtk_widget_set_visible (row->comment_label, comment != NULL);
@@ -79,37 +79,37 @@ gs_sources_dialog_row_set_comment (GsSourcesDialogRow *row, const gchar *comment
}
void
-gs_sources_dialog_row_set_description (GsSourcesDialogRow *row, const gchar *description)
+gs_repos_dialog_row_set_description (GsReposDialogRow *row, const gchar *description)
{
gtk_label_set_markup (GTK_LABEL (row->description_label), description);
gtk_widget_set_visible (row->description_label, description != NULL);
}
static void
-gs_sources_dialog_switch_active_cb (GtkSwitch *active_switch,
- GParamSpec *pspec,
- GsSourcesDialogRow *row)
+gs_repos_dialog_switch_active_cb (GtkSwitch *active_switch,
+ GParamSpec *pspec,
+ GsReposDialogRow *row)
{
g_object_notify (G_OBJECT (row), "switch-active");
}
gboolean
-gs_sources_dialog_row_get_switch_active (GsSourcesDialogRow *row)
+gs_repos_dialog_row_get_switch_active (GsReposDialogRow *row)
{
return gtk_switch_get_active (GTK_SWITCH (row->active_switch));
}
static void
-gs_sources_dialog_row_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+gs_repos_dialog_row_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
- GsSourcesDialogRow *row = GS_SOURCES_DIALOG_ROW (object);
+ GsReposDialogRow *row = GS_REPOS_DIALOG_ROW (object);
switch (prop_id) {
case PROP_SWITCH_ACTIVE:
g_value_set_boolean (value,
- gs_sources_dialog_row_get_switch_active (row));
+ gs_repos_dialog_row_get_switch_active (row));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -118,38 +118,38 @@ gs_sources_dialog_row_get_property (GObject *object,
}
static void
-gs_sources_dialog_row_init (GsSourcesDialogRow *row)
+gs_repos_dialog_row_init (GsReposDialogRow *row)
{
gtk_widget_init_template (GTK_WIDGET (row));
g_signal_connect (row->active_switch, "notify::active",
- G_CALLBACK (gs_sources_dialog_switch_active_cb), row);
+ G_CALLBACK (gs_repos_dialog_switch_active_cb), row);
}
static void
-gs_sources_dialog_row_class_init (GsSourcesDialogRowClass *klass)
+gs_repos_dialog_row_class_init (GsReposDialogRowClass *klass)
{
GParamSpec *pspec;
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->get_property = gs_sources_dialog_row_get_property;
+ object_class->get_property = gs_repos_dialog_row_get_property;
pspec = g_param_spec_string ("switch-active", NULL, NULL, FALSE,
G_PARAM_READABLE);
g_object_class_install_property (object_class, PROP_SWITCH_ACTIVE, pspec);
- gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/Software/gs-sources-dialog-row.ui");
+ gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/Software/gs-repos-dialog-row.ui");
- gtk_widget_class_bind_template_child (widget_class, GsSourcesDialogRow, active_switch);
- gtk_widget_class_bind_template_child (widget_class, GsSourcesDialogRow, name_label);
- gtk_widget_class_bind_template_child (widget_class, GsSourcesDialogRow, comment_label);
- gtk_widget_class_bind_template_child (widget_class, GsSourcesDialogRow, description_label);
+ gtk_widget_class_bind_template_child (widget_class, GsReposDialogRow, active_switch);
+ gtk_widget_class_bind_template_child (widget_class, GsReposDialogRow, name_label);
+ gtk_widget_class_bind_template_child (widget_class, GsReposDialogRow, comment_label);
+ gtk_widget_class_bind_template_child (widget_class, GsReposDialogRow, description_label);
}
GtkWidget *
-gs_sources_dialog_row_new (void)
+gs_repos_dialog_row_new (void)
{
- return g_object_new (GS_TYPE_SOURCES_DIALOG_ROW, NULL);
+ return g_object_new (GS_TYPE_REPOS_DIALOG_ROW, NULL);
}
/* vim: set noexpandtab: */
diff --git a/src/gs-sources-dialog-row.h b/src/gs-repos-dialog-row.h
similarity index 61%
rename from src/gs-sources-dialog-row.h
rename to src/gs-repos-dialog-row.h
index 9ee7eb10..88a7cf2f 100644
--- a/src/gs-sources-dialog-row.h
+++ b/src/gs-repos-dialog-row.h
@@ -19,32 +19,32 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef GS_SOURCES_DIALOG_ROW_H
-#define GS_SOURCES_DIALOG_ROW_H
+#ifndef GS_REPOS_DIALOG_ROW_H
+#define GS_REPOS_DIALOG_ROW_H
#include <gtk/gtk.h>
G_BEGIN_DECLS
-#define GS_TYPE_SOURCES_DIALOG_ROW (gs_sources_dialog_row_get_type ())
+#define GS_TYPE_REPOS_DIALOG_ROW (gs_repos_dialog_row_get_type ())
-G_DECLARE_FINAL_TYPE (GsSourcesDialogRow, gs_sources_dialog_row, GS, SOURCES_DIALOG_ROW, GtkListBoxRow)
+G_DECLARE_FINAL_TYPE (GsReposDialogRow, gs_repos_dialog_row, GS, REPOS_DIALOG_ROW, GtkListBoxRow)
-GtkWidget *gs_sources_dialog_row_new (void);
-void gs_sources_dialog_row_set_switch_enabled (GsSourcesDialogRow *row,
+GtkWidget *gs_repos_dialog_row_new (void);
+void gs_repos_dialog_row_set_switch_enabled (GsReposDialogRow *row,
gboolean switch_enabled);
-void gs_sources_dialog_row_set_switch_active (GsSourcesDialogRow *row,
+void gs_repos_dialog_row_set_switch_active (GsReposDialogRow *row,
gboolean switch_active);
-gboolean gs_sources_dialog_row_get_switch_active (GsSourcesDialogRow *row);
-void gs_sources_dialog_row_set_name (GsSourcesDialogRow *row,
+gboolean gs_repos_dialog_row_get_switch_active (GsReposDialogRow *row);
+void gs_repos_dialog_row_set_name (GsReposDialogRow *row,
const gchar *name);
-void gs_sources_dialog_row_set_comment (GsSourcesDialogRow *row,
+void gs_repos_dialog_row_set_comment (GsReposDialogRow *row,
const gchar *comment);
-void gs_sources_dialog_row_set_description (GsSourcesDialogRow *row,
+void gs_repos_dialog_row_set_description (GsReposDialogRow *row,
const gchar *description);
G_END_DECLS
-#endif /* GS_SOURCES_DIALOG_ROW_H */
+#endif /* GS_REPOS_DIALOG_ROW_H */
/* vim: set noexpandtab: */
diff --git a/src/gs-sources-dialog-row.ui b/src/gs-repos-dialog-row.ui
similarity index 97%
rename from src/gs-sources-dialog-row.ui
rename to src/gs-repos-dialog-row.ui
index 67ba9000..318db606 100644
--- a/src/gs-sources-dialog-row.ui
+++ b/src/gs-repos-dialog-row.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.10 -->
- <template class="GsSourcesDialogRow" parent="GtkListBoxRow">
+ <template class="GsReposDialogRow" parent="GtkListBoxRow">
<child>
<object class="GtkBox">
<property name="visible">True</property>
diff --git a/src/gs-sources-dialog.c b/src/gs-repos-dialog.c
similarity index 83%
rename from src/gs-sources-dialog.c
rename to src/gs-repos-dialog.c
index 3f583419..7f52f84e 100644
--- a/src/gs-sources-dialog.c
+++ b/src/gs-repos-dialog.c
@@ -25,12 +25,12 @@
#include <glib/gi18n.h>
#include "gnome-software-private.h"
-#include "gs-sources-dialog.h"
+#include "gs-repos-dialog.h"
#include "gs-os-release.h"
-#include "gs-sources-dialog-row.h"
+#include "gs-repos-dialog-row.h"
#include "gs-common.h"
-struct _GsSourcesDialog
+struct _GsReposDialog
{
GtkDialog parent_instance;
GSettings *settings;
@@ -53,10 +53,10 @@ struct _GsSourcesDialog
gint nonfree_search_cnt;
};
-G_DEFINE_TYPE (GsSourcesDialog, gs_sources_dialog, GTK_TYPE_DIALOG)
+G_DEFINE_TYPE (GsReposDialog, gs_repos_dialog, GTK_TYPE_DIALOG)
typedef struct {
- GsSourcesDialog *dialog;
+ GsReposDialog *dialog;
GsPluginAction action;
} InstallData;
@@ -67,9 +67,9 @@ install_data_free (InstallData *install_data)
g_slice_free (InstallData, install_data);
}
-static void reload_sources (GsSourcesDialog *dialog);
-static void reload_nonfree_sources (GsSourcesDialog *dialog);
-static void gs_sources_dialog_refresh_proprietary_apps (GsSourcesDialog *dialog);
+static void reload_sources (GsReposDialog *dialog);
+static void reload_nonfree_sources (GsReposDialog *dialog);
+static void gs_repos_dialog_refresh_proprietary_apps (GsReposDialog *dialog);
static gchar *
get_source_installed_text (GPtrArray *sources)
@@ -152,13 +152,13 @@ add_source (GtkListBox *listbox, GsApp *app)
g_autofree gchar *text = NULL;
g_autoptr(GPtrArray) sources = g_ptr_array_new ();
- row = gs_sources_dialog_row_new ();
- gs_sources_dialog_row_set_name (GS_SOURCES_DIALOG_ROW (row),
- gs_app_get_name (app));
+ row = gs_repos_dialog_row_new ();
+ gs_repos_dialog_row_set_name (GS_REPOS_DIALOG_ROW (row),
+ gs_app_get_name (app));
g_ptr_array_add (sources, app);
text = get_source_installed_text (sources);
- gs_sources_dialog_row_set_description (GS_SOURCES_DIALOG_ROW (row),
- text);
+ gs_repos_dialog_row_set_description (GS_REPOS_DIALOG_ROW (row),
+ text);
g_object_set_data_full (G_OBJECT (row), "GsShell::app",
g_object_ref (app),
@@ -191,7 +191,7 @@ source_installed_cb (GObject *source,
}
g_warning ("failed to %s: %s", action_str, error->message);
- gs_sources_dialog_refresh_proprietary_apps (install_data->dialog);
+ gs_repos_dialog_refresh_proprietary_apps (install_data->dialog);
} else {
reload_sources (install_data->dialog);
reload_nonfree_sources (install_data->dialog);
@@ -202,7 +202,7 @@ out:
}
static void
-gs_sources_dialog_install_proprietary_sources (GsSourcesDialog *dialog, gboolean install)
+gs_repos_dialog_install_proprietary_sources (GsReposDialog *dialog, gboolean install)
{
for (guint i = 0; i < gs_app_list_length (dialog->nonfree_source_list); i++) {
GsApp *app = gs_app_list_index (dialog->nonfree_source_list, i);
@@ -237,14 +237,14 @@ gs_sources_dialog_install_proprietary_sources (GsSourcesDialog *dialog, gboolean
}
static void
-gs_sources_dialog_switch_active_cb (GsSourcesDialogRow *row,
- GParamSpec *pspec,
- GsSourcesDialog *dialog)
+gs_repos_dialog_switch_active_cb (GsReposDialogRow *row,
+ GParamSpec *pspec,
+ GsReposDialog *dialog)
{
gboolean active;
- active = gs_sources_dialog_row_get_switch_active (GS_SOURCES_DIALOG_ROW (dialog->row_proprietary));
- gs_sources_dialog_install_proprietary_sources (dialog, active);
+ active = gs_repos_dialog_row_get_switch_active (GS_REPOS_DIALOG_ROW (dialog->row_proprietary));
+ gs_repos_dialog_install_proprietary_sources (dialog, active);
g_settings_set_boolean (dialog->settings, "show-nonfree-prompt", FALSE);
}
@@ -260,7 +260,7 @@ all_apps_installed (GsAppList *list)
}
static void
-gs_sources_dialog_refresh_proprietary_apps (GsSourcesDialog *dialog)
+gs_repos_dialog_refresh_proprietary_apps (GsReposDialog *dialog)
{
gboolean switch_active;
g_autofree gchar *uri = NULL;
@@ -290,13 +290,13 @@ gs_sources_dialog_refresh_proprietary_apps (GsSourcesDialog *dialog)
_("Find out moreā¦"));
}
- gs_sources_dialog_row_set_comment (GS_SOURCES_DIALOG_ROW (dialog->row_proprietary), str->str);
- gs_sources_dialog_row_set_description (GS_SOURCES_DIALOG_ROW (dialog->row_proprietary), NULL);
+ gs_repos_dialog_row_set_comment (GS_REPOS_DIALOG_ROW (dialog->row_proprietary), str->str);
+ gs_repos_dialog_row_set_description (GS_REPOS_DIALOG_ROW (dialog->row_proprietary), NULL);
/* if all the apps are installed, show the switch as active */
switch_active = all_apps_installed (dialog->nonfree_source_list);
- gs_sources_dialog_row_set_switch_active (GS_SOURCES_DIALOG_ROW (dialog->row_proprietary),
- switch_active);
+ gs_repos_dialog_row_set_switch_active (GS_REPOS_DIALOG_ROW (dialog->row_proprietary),
+ switch_active);
gtk_widget_show (dialog->frame_proprietary);
}
@@ -304,7 +304,7 @@ gs_sources_dialog_refresh_proprietary_apps (GsSourcesDialog *dialog)
static void
get_sources_cb (GsPluginLoader *plugin_loader,
GAsyncResult *res,
- GsSourcesDialog *dialog)
+ GsReposDialog *dialog)
{
GsApp *app;
g_autoptr(GError) error = NULL;
@@ -354,7 +354,7 @@ get_sources_cb (GsPluginLoader *plugin_loader,
static void
get_resolve_nonfree_sources_cb (GsPluginLoader *plugin_loader,
GAsyncResult *res,
- GsSourcesDialog *dialog)
+ GsReposDialog *dialog)
{
g_autoptr(GError) error = NULL;
g_autoptr(GsAppList) list = NULL;
@@ -381,11 +381,11 @@ get_resolve_nonfree_sources_cb (GsPluginLoader *plugin_loader,
/* refresh widget */
if (dialog->nonfree_search_cnt == 0)
- gs_sources_dialog_refresh_proprietary_apps (dialog);
+ gs_repos_dialog_refresh_proprietary_apps (dialog);
}
static void
-reload_sources (GsSourcesDialog *dialog)
+reload_sources (GsReposDialog *dialog)
{
g_autoptr(GsPluginJob) plugin_job = NULL;
@@ -406,7 +406,7 @@ reload_sources (GsSourcesDialog *dialog)
}
static void
-reload_nonfree_sources (GsSourcesDialog *dialog)
+reload_nonfree_sources (GsReposDialog *dialog)
{
g_auto(GStrv) nonfree_ids = NULL;
@@ -488,7 +488,7 @@ add_app (GtkListBox *listbox, GsApp *app)
static void
list_row_activated_cb (GtkListBox *list_box,
GtkListBoxRow *row,
- GsSourcesDialog *dialog)
+ GsReposDialog *dialog)
{
GPtrArray *related;
GsApp *app;
@@ -525,7 +525,7 @@ list_row_activated_cb (GtkListBox *list_box,
}
static void
-back_button_cb (GtkWidget *widget, GsSourcesDialog *dialog)
+back_button_cb (GtkWidget *widget, GsReposDialog *dialog)
{
gtk_widget_hide (dialog->button_back);
gtk_stack_set_visible_child_name (GTK_STACK (dialog->stack), "sources");
@@ -534,7 +534,7 @@ back_button_cb (GtkWidget *widget, GsSourcesDialog *dialog)
static gboolean
key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
{
- GsSourcesDialog *dialog = (GsSourcesDialog *) widget;
+ GsReposDialog *dialog = (GsReposDialog *) widget;
GdkKeymap *keymap;
GdkModifierType state;
gboolean is_rtl;
@@ -559,7 +559,7 @@ key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
}
static gboolean
-button_press_event (GsSourcesDialog *dialog, GdkEventButton *event)
+button_press_event (GsReposDialog *dialog, GdkEventButton *event)
{
/* Mouse hardware back button is 8 */
if (event->button != 8)
@@ -592,14 +592,14 @@ get_os_name (void)
static void
updates_changed_cb (GsPluginLoader *plugin_loader,
- GsSourcesDialog *dialog)
+ GsReposDialog *dialog)
{
reload_sources (dialog);
reload_nonfree_sources (dialog);
}
static void
-set_plugin_loader (GsSourcesDialog *dialog, GsPluginLoader *plugin_loader)
+set_plugin_loader (GsReposDialog *dialog, GsPluginLoader *plugin_loader)
{
dialog->plugin_loader = g_object_ref (plugin_loader);
g_signal_connect (dialog->plugin_loader, "updates-changed",
@@ -609,18 +609,18 @@ set_plugin_loader (GsSourcesDialog *dialog, GsPluginLoader *plugin_loader)
static void
settings_changed_cb (GSettings *settings,
const gchar *key,
- GsSourcesDialog *dialog)
+ GsReposDialog *dialog)
{
if (g_strcmp0 (key, "nonfree-software-uri") == 0 ||
g_strcmp0 (key, "nonfree-sources") == 0) {
- gs_sources_dialog_refresh_proprietary_apps (dialog);
+ gs_repos_dialog_refresh_proprietary_apps (dialog);
}
}
static void
-gs_sources_dialog_dispose (GObject *object)
+gs_repos_dialog_dispose (GObject *object)
{
- GsSourcesDialog *dialog = GS_SOURCES_DIALOG (object);
+ GsReposDialog *dialog = GS_REPOS_DIALOG (object);
if (dialog->plugin_loader != NULL) {
g_signal_handlers_disconnect_by_func (dialog->plugin_loader, updates_changed_cb, dialog);
@@ -634,11 +634,11 @@ gs_sources_dialog_dispose (GObject *object)
g_clear_object (&dialog->settings);
g_clear_object (&dialog->nonfree_source_list);
- G_OBJECT_CLASS (gs_sources_dialog_parent_class)->dispose (object);
+ G_OBJECT_CLASS (gs_repos_dialog_parent_class)->dispose (object);
}
static void
-gs_sources_dialog_init (GsSourcesDialog *dialog)
+gs_repos_dialog_init (GsReposDialog *dialog)
{
g_autofree gchar *label_text = NULL;
g_autofree gchar *os_name = NULL;
@@ -672,13 +672,13 @@ gs_sources_dialog_init (GsSourcesDialog *dialog)
/* set up third party repository row */
g_signal_connect (dialog->row_proprietary, "notify::switch-active",
- G_CALLBACK (gs_sources_dialog_switch_active_cb),
+ G_CALLBACK (gs_repos_dialog_switch_active_cb),
dialog);
- gs_sources_dialog_row_set_name (GS_SOURCES_DIALOG_ROW (dialog->row_proprietary),
- /* TRANSLATORS: list header */
- _("Proprietary Software Sources"));
- gs_sources_dialog_row_set_switch_enabled (GS_SOURCES_DIALOG_ROW (dialog->row_proprietary), TRUE);
- gs_sources_dialog_refresh_proprietary_apps (dialog);
+ gs_repos_dialog_row_set_name (GS_REPOS_DIALOG_ROW (dialog->row_proprietary),
+ /* TRANSLATORS: list header */
+ _("Proprietary Software Sources"));
+ gs_repos_dialog_row_set_switch_enabled (GS_REPOS_DIALOG_ROW (dialog->row_proprietary), TRUE);
+ gs_repos_dialog_refresh_proprietary_apps (dialog);
os_name = get_os_name ();
/* TRANSLATORS: This is the text displayed in the Software Sources
@@ -699,35 +699,35 @@ gs_sources_dialog_init (GsSourcesDialog *dialog)
}
static void
-gs_sources_dialog_class_init (GsSourcesDialogClass *klass)
+gs_repos_dialog_class_init (GsReposDialogClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- object_class->dispose = gs_sources_dialog_dispose;
-
- gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/Software/gs-sources-dialog.ui");
-
- gtk_widget_class_bind_template_child (widget_class, GsSourcesDialog, button_back);
- gtk_widget_class_bind_template_child (widget_class, GsSourcesDialog, frame_proprietary);
- gtk_widget_class_bind_template_child (widget_class, GsSourcesDialog, grid_noresults);
- gtk_widget_class_bind_template_child (widget_class, GsSourcesDialog, label2);
- gtk_widget_class_bind_template_child (widget_class, GsSourcesDialog, label_empty);
- gtk_widget_class_bind_template_child (widget_class, GsSourcesDialog, label_header);
- gtk_widget_class_bind_template_child (widget_class, GsSourcesDialog, listbox);
- gtk_widget_class_bind_template_child (widget_class, GsSourcesDialog, listbox_apps);
- gtk_widget_class_bind_template_child (widget_class, GsSourcesDialog, row_proprietary);
- gtk_widget_class_bind_template_child (widget_class, GsSourcesDialog, scrolledwindow_apps);
- gtk_widget_class_bind_template_child (widget_class, GsSourcesDialog, spinner);
- gtk_widget_class_bind_template_child (widget_class, GsSourcesDialog, stack);
+ object_class->dispose = gs_repos_dialog_dispose;
+
+ gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/Software/gs-repos-dialog.ui");
+
+ gtk_widget_class_bind_template_child (widget_class, GsReposDialog, button_back);
+ gtk_widget_class_bind_template_child (widget_class, GsReposDialog, frame_proprietary);
+ gtk_widget_class_bind_template_child (widget_class, GsReposDialog, grid_noresults);
+ gtk_widget_class_bind_template_child (widget_class, GsReposDialog, label2);
+ gtk_widget_class_bind_template_child (widget_class, GsReposDialog, label_empty);
+ gtk_widget_class_bind_template_child (widget_class, GsReposDialog, label_header);
+ gtk_widget_class_bind_template_child (widget_class, GsReposDialog, listbox);
+ gtk_widget_class_bind_template_child (widget_class, GsReposDialog, listbox_apps);
+ gtk_widget_class_bind_template_child (widget_class, GsReposDialog, row_proprietary);
+ gtk_widget_class_bind_template_child (widget_class, GsReposDialog, scrolledwindow_apps);
+ gtk_widget_class_bind_template_child (widget_class, GsReposDialog, spinner);
+ gtk_widget_class_bind_template_child (widget_class, GsReposDialog, stack);
}
GtkWidget *
-gs_sources_dialog_new (GtkWindow *parent, GsPluginLoader *plugin_loader)
+gs_repos_dialog_new (GtkWindow *parent, GsPluginLoader *plugin_loader)
{
- GsSourcesDialog *dialog;
+ GsReposDialog *dialog;
- dialog = g_object_new (GS_TYPE_SOURCES_DIALOG,
+ dialog = g_object_new (GS_TYPE_REPOS_DIALOG,
"use-header-bar", TRUE,
"transient-for", parent,
"modal", TRUE,
diff --git a/src/gs-sources-dialog.h b/src/gs-repos-dialog.h
similarity index 78%
rename from src/gs-sources-dialog.h
rename to src/gs-repos-dialog.h
index d2dd59e8..6857c06f 100644
--- a/src/gs-sources-dialog.h
+++ b/src/gs-repos-dialog.h
@@ -19,8 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef GS_SOURCES_DIALOG_H
-#define GS_SOURCES_DIALOG_H
+#ifndef GS_REPOS_DIALOG_H
+#define GS_REPOS_DIALOG_H
#include <gtk/gtk.h>
@@ -28,15 +28,15 @@
G_BEGIN_DECLS
-#define GS_TYPE_SOURCES_DIALOG (gs_sources_dialog_get_type ())
+#define GS_TYPE_REPOS_DIALOG (gs_repos_dialog_get_type ())
-G_DECLARE_FINAL_TYPE (GsSourcesDialog, gs_sources_dialog, GS, SOURCES_DIALOG, GtkDialog)
+G_DECLARE_FINAL_TYPE (GsReposDialog, gs_repos_dialog, GS, REPOS_DIALOG, GtkDialog)
-GtkWidget *gs_sources_dialog_new (GtkWindow *parent,
+GtkWidget *gs_repos_dialog_new (GtkWindow *parent,
GsPluginLoader *plugin_loader);
G_END_DECLS
-#endif /* GS_SOURCES_DIALOG_H */
+#endif /* GS_REPOS_DIALOG_H */
/* vim: set noexpandtab: */
diff --git a/src/gs-sources-dialog.ui b/src/gs-repos-dialog.ui
similarity index 99%
rename from src/gs-sources-dialog.ui
rename to src/gs-repos-dialog.ui
index 4e39b812..0f8b767d 100644
--- a/src/gs-sources-dialog.ui
+++ b/src/gs-repos-dialog.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.10"/>
- <template class="GsSourcesDialog" parent="GtkDialog">
+ <template class="GsReposDialog" parent="GtkDialog">
<property name="can_focus">False</property>
<property name="title" translatable="yes">Software Sources</property>
<property name="modal">True</property>
@@ -144,7 +144,7 @@
<property name="can_focus">False</property>
<property name="selection_mode">none</property>
<child>
- <object class="GsSourcesDialogRow" id="row_proprietary">
+ <object class="GsReposDialogRow" id="row_proprietary">
<property name="visible">True</property>
<property name="activatable">False</property>
</object>
diff --git a/src/gs-shell.c b/src/gs-shell.c
index ae9eab5f..138e6dbe 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -36,7 +36,7 @@
#include "gs-updates-page.h"
#include "gs-category-page.h"
#include "gs-extras-page.h"
-#include "gs-sources-dialog.h"
+#include "gs-repos-dialog.h"
#include "gs-update-dialog.h"
#include "gs-update-monitor.h"
#include "gs-utils.h"
@@ -1916,7 +1916,7 @@ gs_shell_show_sources (GsShell *shell)
if (g_spawn_command_line_async ("software-properties-gtk", NULL))
return;
- dialog = gs_sources_dialog_new (priv->main_window, priv->plugin_loader);
+ dialog = gs_repos_dialog_new (priv->main_window, priv->plugin_loader);
gs_shell_modal_dialog_present (shell, GTK_DIALOG (dialog));
/* just destroy */
diff --git a/src/meson.build b/src/meson.build
index 97e449b5..f2a82178 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -46,6 +46,8 @@ gnome_software_sources = [
'gs-popular-tile.c',
'gs-progress-button.c',
'gs-removal-dialog.c',
+ 'gs-repos-dialog.c',
+ 'gs-repos-dialog-row.c',
'gs-review-bar.c',
'gs-review-dialog.c',
'gs-review-histogram.c',
@@ -54,8 +56,6 @@ gnome_software_sources = [
'gs-search-page.c',
'gs-shell.c',
'gs-shell-search-provider.c',
- 'gs-sources-dialog.c',
- 'gs-sources-dialog-row.c',
'gs-star-widget.c',
'gs-summary-tile.c',
'gs-update-dialog.c',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]