[Xfce4-commits] [panel-plugins/xfce4-xkb-plugin] 01/02: Minor code style update
noreply at xfce.org
noreply at xfce.org
Wed Jul 26 21:30:24 CEST 2017
This is an automated email from the git hooks/post-receive script.
n i n e t l s p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository panel-plugins/xfce4-xkb-plugin.
commit 31f23e250d9132fb2517e85121427b49fe035cd3
Author: Viktor Odintsev <zakhams at gmail.com>
Date: Wed Jul 26 22:18:44 2017 +0300
Minor code style update
---
panel-plugin/xkb-dialog.c | 4 +--
panel-plugin/xkb-keyboard.c | 36 +++++++------------
panel-plugin/xkb-plugin.c | 88 ++++++++++++++++-----------------------------
3 files changed, 44 insertions(+), 84 deletions(-)
diff --git a/panel-plugin/xkb-dialog.c b/panel-plugin/xkb-dialog.c
index e63ad1a..1c63cac 100644
--- a/panel-plugin/xkb-dialog.c
+++ b/panel-plugin/xkb-dialog.c
@@ -193,9 +193,9 @@ xkb_dialog_configure_plugin (XfcePanelPlugin *plugin,
gtk_widget_show_all (vbox);
- g_signal_connect_swapped ((gpointer) settings_dialog, "response",
+ g_signal_connect_swapped (settings_dialog, "response",
G_CALLBACK (xfce_panel_plugin_unblock_menu), plugin);
- g_signal_connect ((gpointer) settings_dialog, "response",
+ g_signal_connect (settings_dialog, "response",
G_CALLBACK (gtk_widget_destroy), NULL);
g_object_bind_property (G_OBJECT (config), DISPLAY_TYPE,
diff --git a/panel-plugin/xkb-keyboard.c b/panel-plugin/xkb-keyboard.c
index 127ef2b..a7fb88b 100644
--- a/panel-plugin/xkb-keyboard.c
+++ b/panel-plugin/xkb-keyboard.c
@@ -179,10 +179,8 @@ xkb_keyboard_new (XkbXfconf *config)
keyboard->group_policy = xkb_xfconf_get_group_policy (config);
- g_signal_connect_swapped (G_OBJECT (config),
- "notify::" GROUP_POLICY,
- G_CALLBACK (xkb_keyboard_group_policy_changed),
- keyboard);
+ g_signal_connect_swapped (G_OBJECT (config), "notify::" GROUP_POLICY,
+ G_CALLBACK (xkb_keyboard_group_policy_changed), keyboard);
g_object_ref (config);
keyboard->config = config;
@@ -199,32 +197,22 @@ xkb_keyboard_new (XkbXfconf *config)
xkl_engine_start_listen (keyboard->engine, XKLL_TRACK_KEYBOARD_STATE);
- g_signal_connect (keyboard->engine,
- "X-state-changed",
- G_CALLBACK (xkb_keyboard_xkl_state_changed),
- keyboard);
- g_signal_connect (keyboard->engine,
- "X-config-changed",
- G_CALLBACK (xkb_keyboard_xkl_config_changed),
- keyboard);
+ g_signal_connect (keyboard->engine, "X-state-changed",
+ G_CALLBACK (xkb_keyboard_xkl_state_changed), keyboard);
+ g_signal_connect (keyboard->engine, "X-config-changed",
+ G_CALLBACK (xkb_keyboard_xkl_config_changed), keyboard);
gdk_window_add_filter (NULL, xkb_keyboard_handle_xevent, keyboard);
keyboard->active_window_changed_handler_id =
- g_signal_connect (G_OBJECT (keyboard->wnck_screen),
- "active-window-changed",
- G_CALLBACK (xkb_keyboard_active_window_changed),
- keyboard);
+ g_signal_connect (G_OBJECT (keyboard->wnck_screen), "active-window-changed",
+ G_CALLBACK (xkb_keyboard_active_window_changed), keyboard);
keyboard->application_closed_handler_id =
- g_signal_connect (G_OBJECT (keyboard->wnck_screen),
- "application-closed",
- G_CALLBACK (xkb_keyboard_application_closed),
- keyboard);
+ g_signal_connect (G_OBJECT (keyboard->wnck_screen), "application-closed",
+ G_CALLBACK (xkb_keyboard_application_closed), keyboard);
keyboard->window_closed_handler_id =
- g_signal_connect (G_OBJECT (keyboard->wnck_screen),
- "window-closed",
- G_CALLBACK (xkb_keyboard_window_closed),
- keyboard);
+ g_signal_connect (G_OBJECT (keyboard->wnck_screen), "window-closed",
+ G_CALLBACK (xkb_keyboard_window_closed), keyboard);
}
return keyboard;
diff --git a/panel-plugin/xkb-plugin.c b/panel-plugin/xkb-plugin.c
index ad3abc2..c8e4339 100644
--- a/panel-plugin/xkb-plugin.c
+++ b/panel-plugin/xkb-plugin.c
@@ -171,22 +171,14 @@ xkb_plugin_construct (XfcePanelPlugin *plugin)
xkb_plugin->config = xkb_xfconf_new (xfce_panel_plugin_get_property_base (plugin));
- g_signal_connect_swapped (G_OBJECT (xkb_plugin->config),
- "notify::" DISPLAY_TYPE,
- G_CALLBACK (xkb_plugin_update_size_allocation),
- xkb_plugin);
- g_signal_connect_swapped (G_OBJECT (xkb_plugin->config),
- "notify::" DISPLAY_NAME,
- G_CALLBACK (xkb_plugin_refresh_gui),
- xkb_plugin);
- g_signal_connect_swapped (G_OBJECT (xkb_plugin->config),
- "notify::" DISPLAY_SCALE,
- G_CALLBACK (xkb_plugin_refresh_gui),
- xkb_plugin);
- g_signal_connect_swapped (G_OBJECT (xkb_plugin->config),
- "notify::" CAPS_LOCK_INDICATOR,
- G_CALLBACK (xkb_plugin_refresh_gui),
- xkb_plugin);
+ g_signal_connect_swapped (G_OBJECT (xkb_plugin->config), "notify::" DISPLAY_TYPE,
+ G_CALLBACK (xkb_plugin_update_size_allocation), xkb_plugin);
+ g_signal_connect_swapped (G_OBJECT (xkb_plugin->config), "notify::" DISPLAY_NAME,
+ G_CALLBACK (xkb_plugin_refresh_gui), xkb_plugin);
+ g_signal_connect_swapped (G_OBJECT (xkb_plugin->config), "notify::" DISPLAY_SCALE,
+ G_CALLBACK (xkb_plugin_refresh_gui), xkb_plugin);
+ g_signal_connect_swapped (G_OBJECT (xkb_plugin->config), "notify::" CAPS_LOCK_INDICATOR,
+ G_CALLBACK (xkb_plugin_refresh_gui), xkb_plugin);
xkb_plugin->button = gtk_button_new ();
gtk_button_set_relief (GTK_BUTTON (xkb_plugin->button), GTK_RELIEF_NONE);
@@ -203,39 +195,27 @@ xkb_plugin_construct (XfcePanelPlugin *plugin)
g_object_unref (css_provider);
gtk_widget_show (xkb_plugin->button);
- g_signal_connect (xkb_plugin->button,
- "button-press-event",
- G_CALLBACK (xkb_plugin_button_clicked),
- xkb_plugin);
- g_signal_connect (xkb_plugin->button,
- "button-release-event",
- G_CALLBACK (xkb_plugin_button_clicked),
- xkb_plugin);
- g_signal_connect (xkb_plugin->button,
- "scroll-event",
- G_CALLBACK (xkb_plugin_button_scrolled),
- xkb_plugin);
-
- g_object_set (G_OBJECT (xkb_plugin->button), "has-tooltip", TRUE, NULL);
- g_signal_connect (xkb_plugin->button,
- "query-tooltip",
- G_CALLBACK (xkb_plugin_set_tooltip),
- xkb_plugin);
+ g_signal_connect (xkb_plugin->button, "button-press-event",
+ G_CALLBACK (xkb_plugin_button_clicked), xkb_plugin);
+ g_signal_connect (xkb_plugin->button, "button-release-event",
+ G_CALLBACK (xkb_plugin_button_clicked), xkb_plugin);
+ g_signal_connect (xkb_plugin->button, "scroll-event",
+ G_CALLBACK (xkb_plugin_button_scrolled), xkb_plugin);
+
+ gtk_widget_set_has_tooltip (xkb_plugin->button, TRUE);
+ g_signal_connect (xkb_plugin->button, "query-tooltip",
+ G_CALLBACK (xkb_plugin_set_tooltip), xkb_plugin);
xkb_plugin->layout_image = gtk_image_new ();
gtk_container_add (GTK_CONTAINER (xkb_plugin->button), xkb_plugin->layout_image);
- g_signal_connect (G_OBJECT (xkb_plugin->layout_image),
- "draw",
- G_CALLBACK (xkb_plugin_layout_image_draw),
- xkb_plugin);
+ g_signal_connect (G_OBJECT (xkb_plugin->layout_image), "draw",
+ G_CALLBACK (xkb_plugin_layout_image_draw), xkb_plugin);
gtk_widget_show (xkb_plugin->layout_image);
xkb_plugin->keyboard = xkb_keyboard_new (xkb_plugin->config);
- g_signal_connect_swapped (G_OBJECT (xkb_plugin->keyboard),
- "state-changed",
- G_CALLBACK (xkb_plugin_state_changed),
- xkb_plugin);
+ g_signal_connect_swapped (G_OBJECT (xkb_plugin->keyboard), "state-changed",
+ G_CALLBACK (xkb_plugin_state_changed), xkb_plugin);
if (xkb_keyboard_get_initialized (xkb_plugin->keyboard))
{
@@ -245,10 +225,8 @@ xkb_plugin_construct (XfcePanelPlugin *plugin)
xkb_plugin->modifier = xkb_modifier_new ();
- g_signal_connect_swapped (G_OBJECT (xkb_plugin->modifier),
- "modifier-changed",
- G_CALLBACK (xkb_plugin_modifier_changed),
- xkb_plugin);
+ g_signal_connect_swapped (G_OBJECT (xkb_plugin->modifier), "modifier-changed",
+ G_CALLBACK (xkb_plugin_modifier_changed), xkb_plugin);
xfce_textdomain (GETTEXT_PACKAGE, LOCALEDIR, "UTF-8");
@@ -261,10 +239,8 @@ xkb_plugin_construct (XfcePanelPlugin *plugin)
gtk_widget_show (configure_layouts);
xfce_panel_plugin_menu_insert_item (plugin, GTK_MENU_ITEM (configure_layouts));
- g_signal_connect (G_OBJECT (configure_layouts),
- "activate",
- G_CALLBACK (xkb_plugin_configure_layout),
- NULL);
+ g_signal_connect (G_OBJECT (configure_layouts), "activate",
+ G_CALLBACK (xkb_plugin_configure_layout), NULL);
}
@@ -452,19 +428,15 @@ xkb_plugin_popup_menu_populate (XkbPlugin *plugin)
plugin->popup_user_data[i].plugin = plugin;
plugin->popup_user_data[i].group = i;
- g_signal_connect (G_OBJECT (menu_item),
- "activate",
- G_CALLBACK (xkb_plugin_set_group),
- &plugin->popup_user_data[i]);
+ g_signal_connect (G_OBJECT (menu_item), "activate",
+ G_CALLBACK (xkb_plugin_set_group), &plugin->popup_user_data[i]);
gtk_widget_show (menu_item);
gtk_menu_shell_append (GTK_MENU_SHELL (plugin->popup), menu_item);
}
- g_signal_connect_swapped (GTK_MENU_SHELL (plugin->popup),
- "deactivate",
- G_CALLBACK (xkb_plugin_popup_menu_deactivate),
- plugin);
+ g_signal_connect_swapped (GTK_MENU_SHELL (plugin->popup), "deactivate",
+ G_CALLBACK (xkb_plugin_popup_menu_deactivate), plugin);
gtk_menu_attach_to_widget (GTK_MENU (plugin->popup), plugin->button, NULL);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list