[glade] GladeWindow: Remove survey
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] GladeWindow: Remove survey
- Date: Wed, 10 Aug 2022 20:27:30 +0000 (UTC)
commit 3970e9706c5e0eaf5672652359151cde70cf4ae8
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date: Thu Apr 21 17:45:29 2022 -0300
GladeWindow: Remove survey
We do not need to run the survey anymore since there is not plan for further development.
src/glade-http.c | 547 --------
src/glade-http.h | 92 --
src/glade-registration.c | 1100 ---------------
src/glade-registration.css | 79 --
src/glade-registration.glade | 2649 -------------------------------------
src/glade-registration.h | 60 -
src/glade-resources.gresource.xml | 2 -
src/glade-window.c | 77 --
src/glade-window.h | 2 -
src/glade.glade | 17 +-
src/main.c | 2 -
src/meson.build | 4 -
12 files changed, 2 insertions(+), 4629 deletions(-)
---
diff --git a/src/glade-resources.gresource.xml b/src/glade-resources.gresource.xml
index 4ada8c66..3b42e721 100644
--- a/src/glade-resources.gresource.xml
+++ b/src/glade-resources.gresource.xml
@@ -3,8 +3,6 @@
<gresource prefix="/org/gnome/glade">
<file compressed="true" preprocess="xml-stripblanks">glade.glade</file>
<file compressed="true" preprocess="xml-stripblanks">glade-preferences.glade</file>
- <file compressed="true" preprocess="xml-stripblanks">glade-registration.glade</file>
<file compressed="true">glade-window.css</file>
- <file compressed="true">glade-registration.css</file>
</gresource>
</gresources>
diff --git a/src/glade-window.c b/src/glade-window.c
index 08d34eef..b54beb21 100644
--- a/src/glade-window.c
+++ b/src/glade-window.c
@@ -30,7 +30,6 @@
#include "glade-window.h"
#include "glade-resources.h"
#include "glade-preferences.h"
-#include "glade-registration.h"
#include "glade-settings.h"
#include "glade-intro.h"
@@ -110,8 +109,6 @@ struct _GladeWindowPrivate
GtkWidget *open_button_box; /* gtk_button_box_set_layout() set homogeneous to TRUE, and we do not want
that in this case */
GtkWidget *save_button_box;
- GtkWidget *registration; /* Registration and user survey dialog */
-
GladeIntro *intro;
GType new_type;
@@ -1584,15 +1581,6 @@ add_project (GladeWindow *window, GladeProject *project, gboolean for_file)
refresh_title (window);
}
-static void
-on_registration_action_activate (GSimpleAction *action,
- GVariant *parameter,
- gpointer data)
-{
- GladeWindow *window = data;
- gtk_window_present (GTK_WINDOW (window->priv->registration));
-}
-
static gboolean
on_undo_button_button_press_event (GtkWidget *widget,
GdkEvent *event,
@@ -1791,7 +1779,6 @@ glade_window_dispose (GObject *object)
GladeWindow *window = GLADE_WINDOW (object);
g_clear_object (&window->priv->app);
- g_clear_object (&window->priv->registration);
G_OBJECT_CLASS (glade_window_parent_class)->dispose (object);
}
@@ -2108,8 +2095,6 @@ glade_window_init (GladeWindow *window)
gtk_box_set_homogeneous (GTK_BOX (priv->open_button_box), FALSE);
gtk_box_set_homogeneous (GTK_BOX (priv->save_button_box), FALSE);
- priv->registration = glade_registration_new ();
-
/* Add Gdk backend as a class */
ctx = gtk_widget_get_style_context (GTK_WIDGET (window));
gtk_style_context_add_class (ctx, glade_window_get_gdk_backend ());
@@ -2327,7 +2312,6 @@ on_application_notify (GObject *gobject, GParamSpec *pspec)
static GActionEntry actions[] = {
{ "open", on_open_action_activate, NULL, NULL, NULL },
{ "new", on_new_action_activate, NULL, NULL, NULL },
- { "registration", on_registration_action_activate, NULL, NULL, NULL },
{ "intro", on_intro_action_activate, NULL, NULL, NULL },
{ "reference", on_reference_action_activate, NULL, NULL, NULL },
{ "help", on_user_manuel_action_activate, NULL, NULL, NULL },
@@ -2502,67 +2486,6 @@ glade_window_check_devhelp (GladeWindow *window)
g_signal_connect (glade_app_get (), "doc-search", G_CALLBACK (doc_search_cb), window);
}
-void
-glade_window_registration_notify_user (GladeWindow *window)
-{
- gboolean skip_reminder, completed;
- GladeWindowPrivate *priv;
-
- g_return_if_fail (GLADE_IS_WINDOW (window));
- priv = window->priv;
-
- if (!g_tls_backend_supports_tls (g_tls_backend_get_default ()))
- {
- g_message ("No TLS support in GIO, Registration & User Survey disabled. (missing glib-networking
package)");
- actions_set_enabled (window, "registration", FALSE);
- return;
- }
-
- g_object_get (priv->registration,
- "completed", &completed,
- "skip-reminder", &skip_reminder,
- NULL);
-
- if (!completed && !skip_reminder)
- {
- GtkWidget *dialog, *check;
-
- dialog = gtk_message_dialog_new (GTK_WINDOW (glade_app_get_window ()),
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_YES_NO,
- "%s",
- /* translators: Primary message of a dialog used to notify the user
about the survey */
- _("We are conducting a user survey\n would you like to take it
now?"));
-
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s",
- /* translators: Secondary text of a dialog used to notify
the user about the survey */
- _("If not, you can always find it in the Help menu."));
-
- check = gtk_check_button_new_with_mnemonic (_("_Do not show this dialog again"));
- gtk_box_pack_end (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
- check, FALSE, FALSE, 0);
- gtk_widget_set_halign (check, GTK_ALIGN_START);
- gtk_widget_set_margin_start (check, 6);
- gtk_widget_show (check);
-
- if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_YES)
- gtk_window_present (GTK_WINDOW (priv->registration));
-
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check)))
- {
- g_object_set (priv->registration, "skip-reminder", TRUE, NULL);
- glade_app_config_save ();
- }
-
- gtk_widget_destroy (dialog);
- }
- else if (!completed)
- glade_util_flash_message (priv->statusbar, priv->statusbar_context_id, "%s",
- /* translators: Text to show in the statusbar if the user did not completed
the survey and choose not to show the notification dialog again */
- _("Go to Help -> Registration & User Survey and complete our survey!"));
-}
-
#ifdef GDK_WINDOWING_X11
#include "gdk/gdkx.h"
#endif
diff --git a/src/glade-window.h b/src/glade-window.h
index 01657dc8..059718f7 100644
--- a/src/glade-window.h
+++ b/src/glade-window.h
@@ -58,8 +58,6 @@ gboolean glade_window_open_project (GladeWindow *window,
void glade_window_check_devhelp (GladeWindow *window);
-void glade_window_registration_notify_user (GladeWindow *window);
-
const gchar *glade_window_get_gdk_backend (void);
G_END_DECLS
diff --git a/src/glade.glade b/src/glade.glade
index f042ab4c..e13f19fa 100644
--- a/src/glade.glade
+++ b/src/glade.glade
@@ -63,20 +63,6 @@ Author: Juan Pablo Ugarte
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkModelButton">
- <property name="visible">True</property>
- <property name="can-focus">True</property>
- <property name="receives-default">True</property>
- <property name="action-name">app.registration</property>
- <property name="text" translatable="yes">Registration & User Survey</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
@@ -226,10 +212,11 @@ Author: Juan Pablo Ugarte
<property name="name">version-label</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
+ <property name="valign">start</property>
<property name="width-chars">32</property>
</object>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
diff --git a/src/main.c b/src/main.c
index c743e3d8..019c89f5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -110,8 +110,6 @@ activate (GApplication *application)
glade_window_check_devhelp (window);
gtk_widget_show (GTK_WIDGET (window));
-
- glade_window_registration_notify_user (window);
}
static void
diff --git a/src/meson.build b/src/meson.build
index 3fbc167c..40c730a0 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -13,10 +13,8 @@ else
endif
sources = files(
- 'glade-http.c',
'glade-intro.c',
'glade-preferences.c',
- 'glade-registration.c',
'glade-settings.c',
'glade-window.c',
'main.c',
@@ -25,8 +23,6 @@ sources = files(
resource_data = files(
'glade.glade',
'glade-preferences.glade',
- 'glade-registration.css',
- 'glade-registration.glade',
'glade-window.css'
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]