[krb5-auth-dialog: 10/15] applet: Use 'activate' instead of a separate button
- From: Guido Günther <guidog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [krb5-auth-dialog: 10/15] applet: Use 'activate' instead of a separate button
- Date: Sat, 6 Feb 2021 19:16:58 +0000 (UTC)
commit 210f2dc2d2e399854dc365ed245bf3c49f1f83ec
Author: Guido Günther <agx sigxcpu org>
Date: Sat Feb 6 18:55:37 2021 +0100
applet: Use 'activate' instead of a separate button
Easier to use and less cluttered
src/ka-applet.c | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
---
diff --git a/src/ka-applet.c b/src/ka-applet.c
index 05c7ddc..8ebd371 100644
--- a/src/ka-applet.c
+++ b/src/ka-applet.c
@@ -181,6 +181,7 @@ ka_applet_local_command_line (GApplication *application,
return FALSE;
}
+
GtkWindow *ka_applet_last_focused_window (KaApplet *self)
{
GList *l = gtk_application_get_windows (GTK_APPLICATION(self));
@@ -256,17 +257,6 @@ setup_signal_handlers (KaApplet *applet)
}
-static void
-ka_list_tickets_action (GSimpleAction *action G_GNUC_UNUSED,
- GVariant *parameter G_GNUC_UNUSED,
- gpointer userdata)
-{
- KaApplet *self = KA_APPLET (userdata);
- KA_DEBUG ("Showing main window");
- ka_main_window_show (self);
-}
-
-
static void
ka_remove_ccache_action (GSimpleAction *action G_GNUC_UNUSED,
GVariant *parameter G_GNUC_UNUSED,
@@ -294,7 +284,6 @@ static GActionEntry app_entries[] = {
{ "about", action_about, NULL, NULL, NULL, {0} },
{ "help", action_help, NULL, NULL, NULL, {0} },
{ "quit", action_quit, NULL, NULL, NULL, {0} },
- { "list-tickets", ka_list_tickets_action, NULL, NULL, NULL, {0} },
{ "acquire-ticket", ka_acquire_tgt_action , NULL, NULL, NULL, {0} },
{ "remove-ccache", ka_remove_ccache_action , NULL, NULL, NULL, {0} },
};
@@ -487,6 +476,7 @@ ka_applet_class_init (KaAppletClass *klass)
ka_applet_local_command_line;
G_APPLICATION_CLASS (klass)->command_line = ka_applet_command_line;
G_APPLICATION_CLASS (klass)->startup = ka_applet_startup;
+ G_APPLICATION_CLASS (klass)->activate = ka_applet_activate;
object_class->set_property = ka_applet_set_property;
object_class->get_property = ka_applet_get_property;
@@ -625,10 +615,6 @@ ka_send_event_notification (KaApplet *self,
g_notification_set_body (notification, message);
g_notification_set_icon (notification, icon);
- g_notification_add_button (notification,
- _("List Tickets"),
- "app.list-tickets");
-
if (get_ticket_action)
g_notification_add_button (notification,
_("Get Ticket"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]