[krb5-auth-dialog] Drop GTK_CHECK_VERSION
- From: Guido Günther <guidog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [krb5-auth-dialog] Drop GTK_CHECK_VERSION
- Date: Thu, 20 Oct 2022 11:26:34 +0000 (UTC)
commit 892f787a8008143b9d82300499cef8106f42a141
Author: Guido Günther <agx sigxcpu org>
Date: Mon Oct 17 10:21:06 2022 +0200
Drop GTK_CHECK_VERSION
We're now on GTK4
src/ka-applet.c | 7 -------
src/ka-preferences.c | 8 --------
src/ka-tools.c | 16 ----------------
3 files changed, 31 deletions(-)
---
diff --git a/src/ka-applet.c b/src/ka-applet.c
index fad94e2..391e994 100644
--- a/src/ka-applet.c
+++ b/src/ka-applet.c
@@ -167,9 +167,6 @@ ka_applet_local_command_line (GApplication *application,
context = g_option_context_new ("- Kerberos 5 credential checking");
g_option_context_add_main_entries (context, options, NULL);
-#if !GTK_CHECK_VERSION(4,0,0)
- g_option_context_add_group (context, gtk_get_option_group (TRUE));
-#endif
g_option_context_parse (context, &argc, argv, &error);
if (error) {
@@ -789,11 +786,7 @@ main (int argc, char *argv[])
g_set_prgname (KA_APP_ID);
g_set_application_name (KA_NAME);
-#if GTK_CHECK_VERSION(4,0,0)
gtk_init ();
-#else
- gtk_init (&argc, &argv);
-#endif
applet = ka_applet_new ();
return g_application_run (G_APPLICATION(applet), argc, argv);
diff --git a/src/ka-preferences.c b/src/ka-preferences.c
index 2d8d126..ff7ec77 100644
--- a/src/ka-preferences.c
+++ b/src/ka-preferences.c
@@ -311,11 +311,7 @@ static void
ka_preferences_smartcard_toggled (GtkWidget *toggle,
gpointer userdata)
{
-#if GTK_CHECK_VERSION(4,0,0)
gboolean smartcard = gtk_check_button_get_active (GTK_CHECK_BUTTON (toggle));
-#else
- gboolean smartcard = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle));
-#endif
static gchar *old_path = NULL;
KaPreferences *self = KA_PREFERENCES(userdata);
@@ -356,11 +352,7 @@ ka_preferences_setup_smartcard_toggle (KaPreferences *self)
if (g_strcmp0 (pkuserid, PKINIT_SMARTCARD) == 0)
active = TRUE;
-#if GTK_CHECK_VERSION(4,0,0)
gtk_check_button_set_active (GTK_CHECK_BUTTON (self->priv->smartcard_toggle), active);
-#else
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->priv->smartcard_toggle), active);
-#endif
}
diff --git a/src/ka-tools.c b/src/ka-tools.c
index 98f15c0..7a91686 100644
--- a/src/ka-tools.c
+++ b/src/ka-tools.c
@@ -32,11 +32,7 @@ ka_show_help (GtkWindow* window, const char* chapter)
url = g_strdup_printf("help:krb5-auth-dialog%s", section);
-#if GTK_CHECK_VERSION(4,0,0)
gtk_show_uri (window, url, GDK_CURRENT_TIME);
-#else
- gtk_show_uri_on_window (window, url, gtk_get_current_event_time (), &error);
-#endif
if (error) {
GtkWidget *message_dialog;
@@ -94,30 +90,18 @@ void
ka_window_destroy (gpointer window)
{
g_assert (GTK_IS_WINDOW (window));
-#if GTK_CHECK_VERSION(4,0,0)
gtk_window_destroy (GTK_WINDOW (window));
-#else
- gtk_widget_destroy (GTK_WIDGET (window));
-#endif
}
void
ka_editable_set_text (gpointer editable, const char *text)
{
-#if GTK_CHECK_VERSION(4,0,0)
gtk_editable_set_text (GTK_EDITABLE(editable), text);
-#else
- gtk_entry_set_text (GTK_ENTRY(editable), text);
-#endif
}
const char *
ka_editable_get_text (gpointer editable)
{
-#if GTK_CHECK_VERSION(4,0,0)
return gtk_editable_get_text (GTK_EDITABLE (editable));
-#else
- return gtk_entry_get_text (GTK_ENTRY (editable));
-#endif
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]