[Xfce4-commits] xfce4-settings:master Plug a small leak.
Updating branch refs/heads/master to c21744e30093a58c7f29bd6541075988526d60ce (commit) from 8d24e58307a784fad26b3d1fa197dfeb641f15de (commit) commit c21744e30093a58c7f29bd6541075988526d60ce Author: Igor Slepchin igor.slepc...@gmail.com Date: Wed Jul 18 15:16:07 2012 -0400 Plug a small leak. xfsettingsd/keyboard-layout.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/xfsettingsd/keyboard-layout.c b/xfsettingsd/keyboard-layout.c index d6d5083..8a8471d 100644 --- a/xfsettingsd/keyboard-layout.c +++ b/xfsettingsd/keyboard-layout.c @@ -151,6 +151,8 @@ xfce_keyboard_layout_helper_process_xmodmap (void) g_error_free (error); } } + +g_free ((gchar*) xmodmap_path); } static void ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-settings:master Restore XKB settings whenever a new keyboard is inserted.
Updating branch refs/heads/master to 8d24e58307a784fad26b3d1fa197dfeb641f15de (commit) from 3eb6c191e1a92e57fa0edde785b0f0b8088b40c5 (commit) commit 8d24e58307a784fad26b3d1fa197dfeb641f15de Author: Igor Slepchin igor.slepc...@gmail.com Date: Wed Jul 18 04:11:04 2012 -0400 Restore XKB settings whenever a new keyboard is inserted. X will reset XKB settings to system defaults whenever a new keyboard is detected, thus losing all the keyboard layout settings controled by XFCE unless care is taken to restore them. This fixes bugs 5637, 7833, 7995, 8736; probably most other bugs about losing xkb configuration as well (i.e., 5600, 5636, 6109, 6642, 6657, 7931, 8019, 8136, 8341, 8435). This should also take care of bug 6370 as the new code takes care not to overwrite any options it does not explicitly control. xfsettingsd/keyboard-layout.c | 39 +++ 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/xfsettingsd/keyboard-layout.c b/xfsettingsd/keyboard-layout.c index 6c83ca4..d6d5083 100644 --- a/xfsettingsd/keyboard-layout.c +++ b/xfsettingsd/keyboard-layout.c @@ -56,6 +56,11 @@ static void xfce_keyboard_layout_helper_channel_property_changed (XfconfChannel static gchar* xfce_keyboard_layout_get_option (gchar **options, gchar *option_name, gchar **other_options); +static GdkFilterReturn handle_xevent (GdkXEvent *xev, + GdkEvent *event, + XfceKeyboardLayoutHelper *helper); +static void xfce_keyboard_layout_reset_xkl_config (XklEngine *xklengine, + XfceKeyboardLayoutHelper *helper); struct _XfceKeyboardLayoutHelperClass { @@ -103,6 +108,11 @@ xfce_keyboard_layout_helper_init (XfceKeyboardLayoutHelper *helper) helper-engine = xkl_engine_get_instance (GDK_DISPLAY ()); helper-config = xkl_config_rec_new (); xkl_config_rec_get_from_server (helper-config, helper-engine); + +gdk_window_add_filter (NULL, (GdkFilterFunc) handle_xevent, helper); +g_signal_connect (helper-engine, X-new-device, + G_CALLBACK (xfce_keyboard_layout_reset_xkl_config), helper); +xkl_engine_start_listen (helper-engine, XKLL_TRACK_KEYBOARD_STATE); #endif /* HAVE_LIBXKLAVIER */ /* load settings */ @@ -333,3 +343,32 @@ xfce_keyboard_layout_helper_channel_property_changed (XfconfChannel *channe xfce_keyboard_layout_helper_process_xmodmap (); } + +static GdkFilterReturn +handle_xevent (GdkXEvent * xev, GdkEvent * event, XfceKeyboardLayoutHelper *helper) +{ +#ifdef HAVE_LIBXKLAVIER +XEvent *xevent = (XEvent *) xev; +xkl_engine_filter_events (helper-engine, xevent); +#endif /* HAVE_LIBXKLAVIER */ + +return GDK_FILTER_CONTINUE; +} + +static void +xfce_keyboard_layout_reset_xkl_config (XklEngine *xklengine, + XfceKeyboardLayoutHelper *helper) +{ +if (!helper-xkb_disable_settings) +{ +xfsettings_dbg (XFSD_DEBUG_KEYBOARD_LAYOUT, +New keyboard detected; restoring XKB settings.); + +xfce_keyboard_layout_helper_set_model (helper); +xfce_keyboard_layout_helper_set_layout (helper); +xfce_keyboard_layout_helper_set_variant (helper); +xfce_keyboard_layout_helper_set_grpkey (helper); + +xfce_keyboard_layout_helper_process_xmodmap (); +} +} ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-settings:master Activate new XKB settings only when they are different from the current system settings.
Updating branch refs/heads/master to 347c3a13823ba0582d336333f1e2fbd45f257ab7 (commit) from 4a35ad448784876b321dfc5384b13a48d7133105 (commit) commit 347c3a13823ba0582d336333f1e2fbd45f257ab7 Author: Igor Slepchin igor.slepc...@gmail.com Date: Thu Jul 19 16:33:57 2012 -0400 Activate new XKB settings only when they are different from the current system settings. xfsettingsd/keyboard-layout.c | 53 1 files changed, 37 insertions(+), 16 deletions(-) diff --git a/xfsettingsd/keyboard-layout.c b/xfsettingsd/keyboard-layout.c index 9f3cfba..94cb9a9 100644 --- a/xfsettingsd/keyboard-layout.c +++ b/xfsettingsd/keyboard-layout.c @@ -182,11 +182,18 @@ xfce_keyboard_layout_helper_set_model (XfceKeyboardLayoutHelper *helper) if (!helper-xkb_disable_settings) { xkbmodel = xfconf_channel_get_string (helper-channel, /Default/XkbModel, helper-config-model); -g_free (helper-config-model); -helper-config-model = xkbmodel; -xkl_config_rec_activate (helper-config, helper-engine); +if (g_strcmp0 (helper-config-model, xkbmodel) != 0) +{ +g_free (helper-config-model); +helper-config-model = xkbmodel; +xkl_config_rec_activate (helper-config, helper-engine); -xfsettings_dbg (XFSD_DEBUG_KEYBOARD_LAYOUT, set model to \%s\, xkbmodel); +xfsettings_dbg (XFSD_DEBUG_KEYBOARD_LAYOUT, set model to \%s\, xkbmodel); +} +else +{ +g_free (xkbmodel); +} } #endif /* HAVE_LIBXKLAVIER */ } @@ -202,13 +209,17 @@ xfce_keyboard_layout_helper_set_layout (XfceKeyboardLayoutHelper *helper) { default_layouts = g_strjoinv(,, helper-config-layouts); val_layout = xfconf_channel_get_string (helper-channel, /Default/XkbLayout, default_layouts); -layouts = g_strsplit_set (val_layout, ,, 0); -g_strfreev(helper-config-layouts); -helper-config-layouts = layouts; -xkl_config_rec_activate (helper-config, helper-engine); -g_free (default_layouts); +if (g_strcmp0 (default_layouts, val_layout) != 0) +{ +layouts = g_strsplit_set (val_layout, ,, 0); +g_strfreev(helper-config-layouts); +helper-config-layouts = layouts; +xkl_config_rec_activate (helper-config, helper-engine); -xfsettings_dbg (XFSD_DEBUG_KEYBOARD_LAYOUT, set layouts to \%s\, val_layout); +xfsettings_dbg (XFSD_DEBUG_KEYBOARD_LAYOUT, set layouts to \%s\, val_layout); +} + +g_free (default_layouts); g_free (val_layout); } #endif /* HAVE_LIBXKLAVIER */ @@ -225,13 +236,18 @@ xfce_keyboard_layout_helper_set_variant (XfceKeyboardLayoutHelper *helper) { default_variants = g_strjoinv(,, helper-config-variants); val_variant = xfconf_channel_get_string (helper-channel, /Default/XkbVariant, default_variants); -variants = g_strsplit_set (val_variant, ,, 0); -g_strfreev(helper-config-variants); -helper-config-variants = variants; -xkl_config_rec_activate (helper-config, helper-engine); -g_free (default_variants); -xfsettings_dbg (XFSD_DEBUG_KEYBOARD_LAYOUT, set variant to \%s\, val_variant); +if (g_strcmp0 (default_variants, val_variant) != 0) +{ +variants = g_strsplit_set (val_variant, ,, 0); +g_strfreev(helper-config-variants); +helper-config-variants = variants; +xkl_config_rec_activate (helper-config, helper-engine); + +xfsettings_dbg (XFSD_DEBUG_KEYBOARD_LAYOUT, set variant to \%s\, val_variant); +} + +g_free (default_variants); g_free (val_variant); } #endif /* HAVE_LIBXKLAVIER */ @@ -384,6 +400,11 @@ xfce_keyboard_layout_reset_xkl_config (XklEngine *xklengine, xfsettings_dbg (XFSD_DEBUG_KEYBOARD_LAYOUT, New keyboard detected; restoring XKB settings.); +#ifdef HAVE_LIBXKLAVIER +xkl_config_rec_reset (helper-config); +xkl_config_rec_get_from_server (helper-config, helper-engine); +#endif /* HAVE_LIBXKLAVIER */ + xfce_keyboard_layout_helper_set_model (helper); xfce_keyboard_layout_helper_set_layout (helper); xfce_keyboard_layout_helper_set_variant (helper); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-settings:master Add Up/Down buttons to allow explicit ordering of keyboard layouts.
Updating branch refs/heads/master to 1a9ef929f30fd8264ca9e996133a4bbceeb1cdf1 (commit) from 347c3a13823ba0582d336333f1e2fbd45f257ab7 (commit) commit 1a9ef929f30fd8264ca9e996133a4bbceeb1cdf1 Author: Igor Slepchin igor.slepc...@gmail.com Date: Thu Jul 19 18:42:43 2012 -0400 Add Up/Down buttons to allow explicit ordering of keyboard layouts. dialogs/keyboard-settings/keyboard-dialog.glade| 82 +- dialogs/keyboard-settings/xfce-keyboard-settings.c | 167 2 files changed, 174 insertions(+), 75 deletions(-) diff --git a/dialogs/keyboard-settings/keyboard-dialog.glade b/dialogs/keyboard-settings/keyboard-dialog.glade index 6768c09..9624960 100644 --- a/dialogs/keyboard-settings/keyboard-dialog.glade +++ b/dialogs/keyboard-settings/keyboard-dialog.glade @@ -735,26 +735,92 @@ object class=GtkAlignment id=alignment4 property name=visibleTrue/property property name=can_focusFalse/property +property name=border_width6/property property name=left_padding12/property child object class=GtkVBox id=vbox8 property name=visibleTrue/property property name=can_focusFalse/property -property name=border_width6/property +property name=border_width0/property property name=spacing6/property child - object class=GtkScrolledWindow id=scrolledwindow1 + object class=GtkHBox id=hbox3 property name=visibleTrue/property -property name=can_focusTrue/property -property name=hscrollbar_policyautomatic/property -property name=vscrollbar_policyautomatic/property -property name=shadow_typeetched-in/property +property name=can_focusFalse/property +property name=border_width0/property +property name=spacing6/property child - object class=GtkTreeView id=xkb_layout_view + object class=GtkVBox id=vbuttonbox1 +property name=visibleTrue/property +property name=can_focusFalse/property +property name=spacing6/property +property name=orientationvertical/property +child + object class=GtkButton id=xkb_layout_up_button +property name=visibleTrue/property +property name=can_focusTrue/property +property name=receives_defaultTrue/property +property name=tooltip_text translatable=yesMove currently selected item up by one row/property +child + object class=GtkImage id=image4 +property name=visibleTrue/property +property name=stockgtk-go-up/property + /object +/child + /object + packing +property name=expandFalse/property +property name=fillFalse/property +property name=position0/property + /packing +/child +child + object class=GtkButton id=xkb_layout_down_button +property name=visibleTrue/property +property name=can_focusTrue/property +property name=receives_defaultTrue/property +property name=tooltip_text translatable=yesMove currently selected item down by one row/property +child + object class=GtkImage id=image3
[Xfce4-commits] xfce4-settings:master Pressing Escape/Enter in Layout selection dialog acts as Cancel/Ok correspondingly.
Updating branch refs/heads/master to 3de5f20cca31d8ba8dbbc9db9f189f0b4f4c0d3c (commit) from 1a9ef929f30fd8264ca9e996133a4bbceeb1cdf1 (commit) commit 3de5f20cca31d8ba8dbbc9db9f189f0b4f4c0d3c Author: Igor Slepchin igor.slepc...@gmail.com Date: Wed Jul 25 00:25:09 2012 -0400 Pressing Escape/Enter in Layout selection dialog acts as Cancel/Ok correspondingly. The old code treated Escape as Ok... dialogs/keyboard-settings/keyboard-dialog.glade|4 ++-- dialogs/keyboard-settings/xfce-keyboard-settings.c |5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dialogs/keyboard-settings/keyboard-dialog.glade b/dialogs/keyboard-settings/keyboard-dialog.glade index 9624960..5a4c9e8 100644 --- a/dialogs/keyboard-settings/keyboard-dialog.glade +++ b/dialogs/keyboard-settings/keyboard-dialog.glade @@ -90,8 +90,8 @@ /object /child action-widgets - action-widget response=1layout_selection_ok_button/action-widget - action-widget response=0layout_selection_cancel_button/action-widget + action-widget response=-5layout_selection_ok_button/action-widget + action-widget response=-6layout_selection_cancel_button/action-widget /action-widgets /object object class=XfceTitledDialog id=keyboard-settings-dialog diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c b/dialogs/keyboard-settings/xfce-keyboard-settings.c index 778e413..fcddca0 100644 --- a/dialogs/keyboard-settings/xfce-keyboard-settings.c +++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c @@ -1677,7 +1677,7 @@ xfce_keyboard_settings_layout_activate_cb (GtkTreeView *tree_view, GtkTreeViewColumn *column, GtkDialog *dialog) { - gtk_dialog_response (dialog, 1); + gtk_dialog_response (dialog, GTK_RESPONSE_OK); } @@ -1719,6 +1719,7 @@ xfce_keyboard_settings_layout_selection (XfceKeyboardSettings *settings, xkl_config_registry_foreach_layout (settings-priv-xkl_registry, (ConfigItemProcessFunc) xfce_keyboard_settings_add_layout_to_list, settings); g_signal_connect (GTK_TREE_VIEW (layout_selection_view), row-activated, G_CALLBACK (xfce_keyboard_settings_layout_activate_cb), keyboard_layout_selection_dialog); + gtk_dialog_set_default_response (GTK_DIALOG (keyboard_layout_selection_dialog), GTK_RESPONSE_OK); } model = gtk_tree_view_get_model (GTK_TREE_VIEW (layout_selection_view)); @@ -1831,7 +1832,7 @@ xfce_keyboard_settings_layout_selection (XfceKeyboardSettings *settings, val_layout = NULL; gtk_widget_show (GTK_WIDGET (keyboard_layout_selection_dialog)); result = gtk_dialog_run (GTK_DIALOG (keyboard_layout_selection_dialog)); - if (result) + if (result == GTK_RESPONSE_OK) { gtk_tree_selection_get_selected (selection, model, iter); gtk_tree_model_get (model, iter, XKB_AVAIL_LAYOUTS_TREE_ID, layout, ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-settings:master Configure group key from xfce4-keyboard-settings.
Updating branch refs/heads/master to 3eb6c191e1a92e57fa0edde785b0f0b8088b40c5 (commit) from 9e08b67bfacc1f82f4d943146dbf6dec24100da2 (commit) commit 3eb6c191e1a92e57fa0edde785b0f0b8088b40c5 Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon Jul 16 15:16:35 2012 -0400 Configure group key from xfce4-keyboard-settings. The group key setting is stored in /Default/XkbOptions/Group on keyboard-layout channel. This fixes bugs 5476, 5580 (together with a corresponding commit to xfce4-xkb-plugin). dialogs/keyboard-settings/keyboard-dialog.glade| 39 +- dialogs/keyboard-settings/xfce-keyboard-settings.c | 147 ++- xfsettingsd/keyboard-layout.c | 100 + 3 files changed, 277 insertions(+), 9 deletions(-) diff --git a/dialogs/keyboard-settings/keyboard-dialog.glade b/dialogs/keyboard-settings/keyboard-dialog.glade index 9edbb6d..6768c09 100644 --- a/dialogs/keyboard-settings/keyboard-dialog.glade +++ b/dialogs/keyboard-settings/keyboard-dialog.glade @@ -689,6 +689,43 @@ /packing /child child + object class=GtkFrame id=xkb_grpkey_frame +property name=visibleTrue/property +property name=can_focusFalse/property +property name=label_xalign0/property +property name=shadow_typenone/property +child + object class=GtkAlignment id=alignment6 +property name=visibleTrue/property +property name=can_focusFalse/property +property name=border_width6/property +property name=left_padding12/property +child + object class=GtkComboBox id=xkb_grpkey_combo +property name=visibleTrue/property +property name=can_focusFalse/property + /object +/child + /object +/child +child type=label + object class=GtkLabel id=label1 +property name=visibleTrue/property +property name=can_focusFalse/property +property name=label translatable=yesChange layout option/property +attributes + attribute name=weight value=bold/ +/attributes + /object +/child + /object + packing +property name=expandFalse/property +property name=fillTrue/property +property name=position2/property + /packing +/child +child object class=GtkFrame id=xkb_layout_frame property name=visibleTrue/property property name=can_focusFalse/property @@ -802,7 +839,7 @@ packing property name=expandTrue/property property name=fillTrue/property -property name=position2/property +property name=position3/property /packing /child /object diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c b/dialogs/keyboard-settings/xfce-keyboard-settings.c index e8b6811..428f112 100644 --- a/dialogs/keyboard-settings/xfce-keyboard-settings.c +++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c @@ -63,9 +63,16 @@ enum enum { -XKB_COMBO_DESCRIPTION = 0, -XKB_COMBO_MODELS, -XKB_COMBO_NUM_COLUMNS +XKB_MODEL_COMBO_DESCRIPTION = 0, +XKB_MODEL_COMBO_MODELS, +XKB_MODEL_COMBO_NUM_COLUMNS +}; + +enum +{ +XKB_GRPKEY_COMBO_DESCRIPTION = 0, +XKB_GRPKEY_COMBO_KEYS, +XKB_GRPKEY_COMBO_NUM_COLUMNS }; enum @@ -136,6 +143,14 @@ static void xfce_keyboard_settings_add_model_to_combo(X static void xfce_keyboard_settings_init_model (XfceKeyboardSettings *settings); static void xfce_keyboard_settings_model_changed_cb (GtkComboBox *combo, XfceKeyboardSettings *settings); + +static void xfce_keyboard_settings_add_grpkey_to_combo (XklConfigRegistry *config_registry, + const XklConfigItem *config_item
[Xfce4-commits] xfce4-settings:master Plug a few more memory leaks.
Updating branch refs/heads/master to 2e389f927ef14dd2ad43b4d25c5910d1bcef7172 (commit) from 3de5f20cca31d8ba8dbbc9db9f189f0b4f4c0d3c (commit) commit 2e389f927ef14dd2ad43b4d25c5910d1bcef7172 Author: Igor Slepchin igor.slepc...@gmail.com Date: Wed Jul 25 01:32:18 2012 -0400 Plug a few more memory leaks. dialogs/keyboard-settings/xfce-keyboard-settings.c | 25 +-- 1 files changed, 22 insertions(+), 3 deletions(-) diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c b/dialogs/keyboard-settings/xfce-keyboard-settings.c index fcddca0..d55177e 100644 --- a/dialogs/keyboard-settings/xfce-keyboard-settings.c +++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c @@ -468,13 +468,16 @@ xfce_keyboard_settings_finalize (GObject *object) XfceKeyboardSettings *settings = XFCE_KEYBOARD_SETTINGS (object); #ifdef HAVE_LIBXKLAVIER - xkl_config_rec_reset (settings-priv-xkl_rec_config); /* Stop xklavier engine */ #ifdef HAVE_LIBXKLAVIER5 xkl_engine_stop_listen (settings-priv-xkl_engine, XKLL_TRACK_KEYBOARD_STATE); #else xkl_engine_stop_listen (settings-priv-xkl_engine); #endif /* HAVE_LIBXKLAVIER5 */ + + g_object_unref (settings-priv-xkl_rec_config); + g_object_unref (settings-priv-xkl_registry); + g_object_unref (settings-priv-xkl_engine); #endif /* HAVE_LIBXKLAVIER */ g_object_unref (G_OBJECT (settings-priv-provider)); @@ -1172,6 +1175,11 @@ xfce_keyboard_settings_set_layout (XfceKeyboardSettings *settings) g_free (variants); variants = tmp; } + else +{ + g_free (val_layout); + g_free (val_variant); +} } xfconf_channel_set_string (settings-priv-keyboard_layout_channel, @@ -1265,6 +1273,8 @@ xfce_keyboard_settings_init_layout (XfceKeyboardSettings *settings) g_strfreev (variants); g_free (default_layouts); g_free (default_variants); + g_free (val_layout); + g_free (val_variant); } @@ -1498,6 +1508,8 @@ xfce_keyboard_settings_edit_layout_button_cb (GtkWidget *widget, g_strfreev (strings); } g_free (layout); + g_free (current_layout); + g_free (current_variant); } @@ -1732,12 +1744,11 @@ xfce_keyboard_settings_layout_selection (XfceKeyboardSettings *settings, if (gtk_tree_model_get_iter_first (model, iter)) { + gchar *tmp_layout; found = FALSE; do { - gchar *tmp_layout; - gtk_tree_model_get (model, iter, XKB_AVAIL_LAYOUTS_TREE_ID, tmp_layout, -1); path = gtk_tree_model_get_path (model, iter); @@ -1797,9 +1808,14 @@ xfce_keyboard_settings_layout_selection (XfceKeyboardSettings *settings, } gtk_tree_path_free (path); + path = NULL; g_free (tmp_layout); + tmp_layout = NULL; } while (gtk_tree_model_iter_next (model, iter)); + g_free (tmp_layout); + if (path) +gtk_tree_path_free (path); if (!found) { @@ -1812,6 +1828,7 @@ xfce_keyboard_settings_layout_selection (XfceKeyboardSettings *settings, gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (layout_selection_view), path, NULL, TRUE, 0.5, 0); + gtk_tree_path_free (path); } } } @@ -1826,6 +1843,7 @@ xfce_keyboard_settings_layout_selection (XfceKeyboardSettings *settings, gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (layout_selection_view), path, NULL, TRUE, 0.5, 0); + gtk_tree_path_free (path); } } @@ -1859,6 +1877,7 @@ xfce_keyboard_settings_layout_selection (XfceKeyboardSettings *settings, g_free (variant); g_free (layout_desc); g_free (variant_desc); + gtk_tree_path_free (path); } gtk_widget_hide (GTK_WIDGET (keyboard_layout_selection_dialog)); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-settings:master Update keyboard model when the corresponding xfconf property changes.
Updating branch refs/heads/master to 60d4de469d9c7f592ce95608163aecb4c2009616 (commit) from cbf93af63ea5335107d91990f39a7e7b3b82b171 (commit) commit 60d4de469d9c7f592ce95608163aecb4c2009616 Author: Igor Slepchin igor.slepc...@gmail.com Date: Fri Jul 27 03:26:14 2012 -0400 Update keyboard model when the corresponding xfconf property changes. Hmm, it sounds like changing keyboard model never really worked without a restart... xfsettingsd/keyboard-layout.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/xfsettingsd/keyboard-layout.c b/xfsettingsd/keyboard-layout.c index 94cb9a9..efce20a 100644 --- a/xfsettingsd/keyboard-layout.c +++ b/xfsettingsd/keyboard-layout.c @@ -362,7 +362,7 @@ xfce_keyboard_layout_helper_channel_property_changed (XfconfChannel *channe } else if (strcmp (property_name, /Default/XkbModel) == 0) { -xfce_keyboard_layout_helper_set_layout (helper); +xfce_keyboard_layout_helper_set_model (helper); } else if (strcmp (property_name, /Default/XkbLayout) == 0) { ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-settings:master Allow deselecting keyboard model.
Updating branch refs/heads/master to cbf93af63ea5335107d91990f39a7e7b3b82b171 (commit) from 2e389f927ef14dd2ad43b4d25c5910d1bcef7172 (commit) commit cbf93af63ea5335107d91990f39a7e7b3b82b171 Author: Igor Slepchin igor.slepc...@gmail.com Date: Thu Jul 26 00:01:37 2012 -0400 Allow deselecting keyboard model. dialogs/keyboard-settings/xfce-keyboard-settings.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c b/dialogs/keyboard-settings/xfce-keyboard-settings.c index d55177e..b2de750 100644 --- a/dialogs/keyboard-settings/xfce-keyboard-settings.c +++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c @@ -381,6 +381,12 @@ xfce_keyboard_settings_constructed (GObject *object) /* Keyboard model combo */ list_store = gtk_list_store_new (XKB_MODEL_COMBO_NUM_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (list_store), 0, GTK_SORT_ASCENDING); + + gtk_list_store_append (list_store, iter); + gtk_list_store_set (list_store, iter, + XKB_MODEL_COMBO_DESCRIPTION, -, + XKB_MODEL_COMBO_MODELS, , -1); + xkl_config_registry_foreach_model (settings-priv-xkl_registry, xfce_keyboard_settings_add_model_to_combo, list_store); @@ -1316,6 +1322,12 @@ xfce_keyboard_settings_init_model (XfceKeyboardSettings *settings) xkbmodel = xfconf_channel_get_string (settings-priv-keyboard_layout_channel, /Default/XkbModel, settings-priv-xkl_rec_config-model); item = gtk_tree_model_get_iter_first (model, iter); + if (xkbmodel == NULL || *xkbmodel == 0) + { + gtk_combo_box_set_active_iter (GTK_COMBO_BOX (view), iter); + return; + } + while (item !found) { gtk_tree_model_get (model, iter, XKB_MODEL_COMBO_MODELS, id, -1); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-settings:master Add compose key combo configuration.
Updating branch refs/heads/master to 8717dfc2559099d7ce0fbf0a6ddf80660afd0081 (commit) from 60d4de469d9c7f592ce95608163aecb4c2009616 (commit) commit 8717dfc2559099d7ce0fbf0a6ddf80660afd0081 Author: Igor Slepchin igor.slepc...@gmail.com Date: Fri Jul 27 15:30:42 2012 -0400 Add compose key combo configuration. Bug 5487. dialogs/keyboard-settings/keyboard-dialog.glade| 79 ++-- dialogs/keyboard-settings/xfce-keyboard-settings.c | 128 xfsettingsd/keyboard-layout.c | 52 ++--- 3 files changed, 230 insertions(+), 29 deletions(-) diff --git a/dialogs/keyboard-settings/keyboard-dialog.glade b/dialogs/keyboard-settings/keyboard-dialog.glade index 5a4c9e8..7eccd51 100644 --- a/dialogs/keyboard-settings/keyboard-dialog.glade +++ b/dialogs/keyboard-settings/keyboard-dialog.glade @@ -518,7 +518,7 @@ property name=border_width12/property property name=spacing6/property child - object class=GtkLabel id=label16 + object class=GtkLabel id=label14 property name=visibleTrue/property property name=can_focusFalse/property property name=xalign0/property @@ -689,34 +689,85 @@ /packing /child child - object class=GtkFrame id=xkb_grpkey_frame + object class=GtkHBox id=hbox4 property name=visibleTrue/property property name=can_focusFalse/property -property name=label_xalign0/property -property name=shadow_typenone/property +property name=border_width0/property +property name=spacing6/property +property name=homogeneousTrue/property child - object class=GtkAlignment id=alignment6 + object class=GtkFrame id=xkb_grpkey_frame property name=visibleTrue/property property name=can_focusFalse/property -property name=border_width6/property -property name=left_padding12/property +property name=label_xalign0/property +property name=shadow_typenone/property child - object class=GtkComboBox id=xkb_grpkey_combo + object class=GtkAlignment id=alignment6 +property name=visibleTrue/property +property name=can_focusFalse/property +property name=border_width6/property +property name=left_padding12/property +child + object class=GtkComboBox id=xkb_grpkey_combo +property name=visibleTrue/property +property name=can_focusFalse/property + /object +/child + /object +/child +child type=label + object class=GtkLabel id=label1 property name=visibleTrue/property property name=can_focusFalse/property +property name=label translatable=yesChange layout option/property +attributes + attribute name=weight value=bold/ +/attributes /object /child /object + packing +property name=expandFalse/property +property name=fillTrue/property +property name=position0/property + /packing /child -child type=label - object class=GtkLabel id=label1 +child + object class=GtkFrame id=xkb_composekey_frame property name=visibleTrue/property property name=can_focusFalse/property -property name=label translatable=yesChange layout option/property -attributes - attribute name=weight value=bold/ -/attributes +property name=label_xalign0/property
[Xfce4-commits] xfce4-settings:master Merge some duplicated code.
Updating branch refs/heads/master to eedc9e968f16065d949bc177c12cda373981b208 (commit) from 8717dfc2559099d7ce0fbf0a6ddf80660afd0081 (commit) commit eedc9e968f16065d949bc177c12cda373981b208 Author: Igor Slepchin igor.slepc...@gmail.com Date: Fri Jul 27 18:39:19 2012 -0400 Merge some duplicated code. Merge nearly identical pieces of code for populating combo boxes in xfce4-keyboard-settings Layout tab and for handling xkb options in xfsettingsd. dialogs/keyboard-settings/xfce-keyboard-settings.c | 415 +++- xfsettingsd/keyboard-layout.c | 63 ++-- 2 files changed, 179 insertions(+), 299 deletions(-) diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c b/dialogs/keyboard-settings/xfce-keyboard-settings.c index 61af9a8..d042c3f 100644 --- a/dialogs/keyboard-settings/xfce-keyboard-settings.c +++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c @@ -63,23 +63,9 @@ enum enum { -XKB_MODEL_COMBO_DESCRIPTION = 0, -XKB_MODEL_COMBO_MODELS, -XKB_MODEL_COMBO_NUM_COLUMNS -}; - -enum -{ -XKB_GRPKEY_COMBO_DESCRIPTION = 0, -XKB_GRPKEY_COMBO_KEYS, -XKB_GRPKEY_COMBO_NUM_COLUMNS -}; - -enum -{ -XKB_COMPOSEKEY_COMBO_DESCRIPTION = 0, -XKB_COMPOSEKEY_COMBO_KEYS, -XKB_COMPOSEKEY_COMBO_NUM_COLUMNS +XKB_LAYOUTS_COMBO_DESCRIPTION = 0, +XKB_LAYOUTS_COMBO_VALUE, +XKB_LAYOUTS_COMBO_NUM_COLUMNS }; enum @@ -107,6 +93,12 @@ typedef enum typedef struct _XfceKeyboardShortcutInfoXfceKeyboardShortcutInfo; +typedef +void (*XfceKeyboardLayoutsComboInitFunc) (XfceKeyboardSettings *settings); + +typedef +void (*XfceKeyboardLayoutsComboChangedFunc) (GtkComboBox *combo, + XfceKeyboardSettings *settings); static void xfce_keyboard_settings_constructed (GObject *object); @@ -149,23 +141,31 @@ static void xfce_keyboard_settings_system_default_cb (G XfceKeyboardSettings *settings); static void xfce_keyboard_settings_set_layout (XfceKeyboardSettings *settings); static void xfce_keyboard_settings_init_layout (XfceKeyboardSettings *settings); -static void xfce_keyboard_settings_add_model_to_combo (XklConfigRegistry *config_registry, + +static void xfce_keyboard_settings_layouts_combo_populate(XfceKeyboardSettings *settings, + const gchar *combo_name, + const gchar *option_group_name, + XfceKeyboardLayoutsComboInitFunc init_func, + XfceKeyboardLayoutsComboChangedFunc cb_func); +static void xfce_keyboard_settings_layouts_combo_init (XfceKeyboardSettings *settings, + const gchar *combo_name, + const gchar *xfconf_prop_name, + const gchar *default_value); +static void xfce_keyboard_settings_layouts_combo_add (XklConfigRegistry *config_registry, const XklConfigItem *config_item, gpointer user_data); +static void xfce_keyboard_settings_layouts_combo_changed (GtkComboBox *combo, + XfceKeyboardSettings *settings, + const gchar *xfconf_prop_name); + static void xfce_keyboard_settings_init_model (XfceKeyboardSettings *settings); static void xfce_keyboard_settings_model_changed_cb (GtkComboBox *combo, XfceKeyboardSettings *settings); -static void xfce_keyboard_settings_add_grpkey_to_combo (XklConfigRegistry *config_registry, - const XklConfigItem *config_item
[Xfce4-commits] xfce4-settings:master Reset keyboard model to system default if the user deselects it in xfce4-keyboard-settings.
Updating branch refs/heads/master to 577d29674c18d4b0eab8325fcc96921d9d0505fd (commit) from eedc9e968f16065d949bc177c12cda373981b208 (commit) commit 577d29674c18d4b0eab8325fcc96921d9d0505fd Author: Igor Slepchin igor.slepc...@gmail.com Date: Fri Jul 27 19:40:23 2012 -0400 Reset keyboard model to system default if the user deselects it in xfce4-keyboard-settings. We assume the system default is the model that was set when xfsettingsd started or a new keyboard was detected. xfsettingsd/keyboard-layout.c | 41 ++--- 1 files changed, 38 insertions(+), 3 deletions(-) diff --git a/xfsettingsd/keyboard-layout.c b/xfsettingsd/keyboard-layout.c index 93db5ba..6c691f3 100644 --- a/xfsettingsd/keyboard-layout.c +++ b/xfsettingsd/keyboard-layout.c @@ -83,6 +83,7 @@ struct _XfceKeyboardLayoutHelper XklEngine *engine; XklConfigRegistry *registry; XklConfigRec *config; +gchar *system_keyboard_model; #endif /* HAVE_LIBXKLAVIER */ }; @@ -113,6 +114,7 @@ xfce_keyboard_layout_helper_init (XfceKeyboardLayoutHelper *helper) helper-engine = xkl_engine_get_instance (GDK_DISPLAY ()); helper-config = xkl_config_rec_new (); xkl_config_rec_get_from_server (helper-config, helper-engine); +helper-system_keyboard_model = g_strdup (helper-config-model); gdk_window_add_filter (NULL, (GdkFilterFunc) handle_xevent, helper); g_signal_connect (helper-engine, X-new-device, @@ -141,6 +143,7 @@ xfce_keyboard_layout_helper_finalize (GObject *object) gdk_window_remove_filter (NULL, (GdkFilterFunc) handle_xevent, helper); g_object_unref (helper-config); g_object_unref (helper-engine); +g_free (helper-system_keyboard_model); #endif /* HAVE_LIBXKLAVIER */ G_OBJECT_CLASS (xfce_keyboard_layout_helper_parent_class)-finalize (object); @@ -183,7 +186,14 @@ xfce_keyboard_layout_helper_set_model (XfceKeyboardLayoutHelper *helper) if (!helper-xkb_disable_settings) { -xkbmodel = xfconf_channel_get_string (helper-channel, /Default/XkbModel, helper-config-model); +xkbmodel = xfconf_channel_get_string (helper-channel, /Default/XkbModel, NULL); +if (!xkbmodel || !*xkbmodel) +{ +/* If xkb model is not set by user, we want to try to use the system default */ +g_free (xkbmodel); +xkbmodel = g_strdup (helper-system_keyboard_model); +} + if (g_strcmp0 (helper-config-model, xkbmodel) != 0) { g_free (helper-config-model); @@ -409,15 +419,39 @@ static void xfce_keyboard_layout_reset_xkl_config (XklEngine *xklengine, XfceKeyboardLayoutHelper *helper) { +#ifdef HAVE_LIBXKLAVIER if (!helper-xkb_disable_settings) { +gchar *xfconf_model; + xfsettings_dbg (XFSD_DEBUG_KEYBOARD_LAYOUT, New keyboard detected; restoring XKB settings.); -#ifdef HAVE_LIBXKLAVIER xkl_config_rec_reset (helper-config); xkl_config_rec_get_from_server (helper-config, helper-engine); -#endif /* HAVE_LIBXKLAVIER */ + +xfconf_model = xfconf_channel_get_string (helper-channel, /Default/XkbModel, NULL); +if (xfconf_model *xfconf_model +g_strcmp0 (xfconf_model, helper-config-model) != 0 +g_strcmp0 (helper-system_keyboard_model, helper-config-model) != 0) +{ +/* We get X-new-device notifications multiple times for a single keyboard device (why?); + if keyboard model is set in user preferences, + we'll reset the default to the user preference when first notified + and we don't want to use that as a system default the next time + the user tries to reset keyboard model to the default in xfce4-keyboard-settings. + + The above conditional says: if user set the keyboard model and that's the one + we see here, don't assume it's the system default since it was us who set it + on the previous notification. + */ +g_free (helper-system_keyboard_model); +helper-system_keyboard_model = g_strdup (helper-config-model); +xfsettings_dbg (XFSD_DEBUG_KEYBOARD_LAYOUT, +system default keyboard model reset: %s, +helper-system_keyboard_model); +} +g_free (xfconf_model); xfce_keyboard_layout_helper_set_model (helper); xfce_keyboard_layout_helper_set_layout (helper); @@ -427,4 +461,5 @@ xfce_keyboard_layout_reset_xkl_config (XklEngine *xklengine, xfce_keyboard_layout_helper_process_xmodmap (); } +#endif /* HAVE_LIBXKLAVIER */ } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-settings:master Return selected layout as a NULL-terminated array of strings.
Updating branch refs/heads/master to 44bfe286fa5c6e513be324186656873e2c6fda21 (commit) from ff3dddeba529057301b5971d3e5689b802a42073 (commit) commit 44bfe286fa5c6e513be324186656873e2c6fda21 Author: Igor Slepchin igor.slepc...@gmail.com Date: Fri Jul 27 23:50:43 2012 -0400 Return selected layout as a NULL-terminated array of strings. We were returning it as a comma-concatenated single string and then splitting on the commas again. This breaks if layout/variant description has any commas in it (e.g., Berber (Morocco, Tifinagh extended phonetic) variant of Arabic). dialogs/keyboard-settings/xfce-keyboard-settings.c | 61 ++-- 1 files changed, 30 insertions(+), 31 deletions(-) diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c b/dialogs/keyboard-settings/xfce-keyboard-settings.c index d042c3f..cc7e81c 100644 --- a/dialogs/keyboard-settings/xfce-keyboard-settings.c +++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c @@ -194,7 +194,7 @@ static void xfce_keyboard_settings_add_variant_to_list (X static void xfce_keyboard_settings_add_layout_to_list (XklConfigRegistry *config_registry, XklConfigItem *config_item, XfceKeyboardSettings *settings); -static gchar * xfce_keyboard_settings_layout_selection (XfceKeyboardSettings *settings, +static gchar** xfce_keyboard_settings_layout_selection (XfceKeyboardSettings *settings, const gchar *layout, const gchar *variant); @@ -1509,8 +1509,7 @@ xfce_keyboard_settings_edit_layout_button_cb (GtkWidget *widget, GtkTreeIter iter; gchar*current_layout; gchar*current_variant; - gchar*layout; - gchar **strings; + gchar **layout_selection; view = gtk_builder_get_object (GTK_BUILDER (settings), xkb_layout_view); model = gtk_tree_view_get_model (GTK_TREE_VIEW (view)); @@ -1522,19 +1521,19 @@ xfce_keyboard_settings_edit_layout_button_cb (GtkWidget *widget, XKB_TREE_VARIANTS, current_variant, -1); - layout = xfce_keyboard_settings_layout_selection (settings, current_layout, current_variant); - if (layout) + layout_selection = + xfce_keyboard_settings_layout_selection (settings, current_layout, current_variant); + if (layout_selection) { - strings = g_strsplit_set (layout, ,, 0); - gtk_list_store_set (GTK_LIST_STORE (model), iter, XKB_TREE_LAYOUTS, strings[0], - XKB_TREE_LAYOUTS_NAMES, strings[1], - XKB_TREE_VARIANTS, strings[2], - XKB_TREE_VARIANTS_NAMES, strings[3], - -1); + gtk_list_store_set (GTK_LIST_STORE (model), iter, + XKB_TREE_LAYOUTS, layout_selection[0], + XKB_TREE_LAYOUTS_NAMES, layout_selection[1], + XKB_TREE_VARIANTS, layout_selection[2], + XKB_TREE_VARIANTS_NAMES, layout_selection[3], + -1); xfce_keyboard_settings_set_layout (settings); - g_strfreev (strings); + g_strfreev (layout_selection); } - g_free (layout); g_free (current_layout); g_free (current_variant); } @@ -1548,26 +1547,24 @@ xfce_keyboard_settings_add_layout_button_cb (GtkWidget *widget, GObject *view; GtkTreeModel *model; GtkTreeIter iter; - gchar*layout; - gchar **strings; + gchar **layout_selection; - layout = xfce_keyboard_settings_layout_selection (settings, NULL, NULL); + layout_selection = xfce_keyboard_settings_layout_selection (settings, NULL, NULL); view = gtk_builder_get_object (GTK_BUILDER (settings), xkb_layout_view); - if (layout) + if (layout_selection) { model = gtk_tree_view_get_model (GTK_TREE_VIEW (view)); gtk_list_store_append (GTK_LIST_STORE (model), iter); - strings = g_strsplit_set (layout, ,, 0); - gtk_list_store_set (GTK_LIST_STORE (model), iter, XKB_TREE_LAYOUTS, strings[0], - XKB_TREE_LAYOUTS_NAMES, strings[1], - XKB_TREE_VARIANTS, strings[2], - XKB_TREE_VARIANTS_NAMES, strings[3], + gtk_list_store_set (GTK_LIST_STORE (model), iter, + XKB_TREE_LAYOUTS, layout_selection[0], + XKB_TREE_LAYOUTS_NAMES, layout_selection[1
[Xfce4-commits] xfce4-settings:master Copy over translations for the new UI labels if available.
Updating branch refs/heads/master to ff3dddeba529057301b5971d3e5689b802a42073 (commit) from 577d29674c18d4b0eab8325fcc96921d9d0505fd (commit) commit ff3dddeba529057301b5971d3e5689b802a42073 Author: Igor Slepchin igor.slepc...@gmail.com Date: Fri Jul 27 20:32:22 2012 -0400 Copy over translations for the new UI labels if available. Change layout option, Compose key are copied from xfce4-xkb-plugin, Move currently selected item... are copied from xfce4-panel. All copied translations are flagged as fuzzy. po/ar.po| 24 po/ast.po | 24 po/bn.po| 12 po/ca.po| 24 po/cs.po| 24 po/da.po| 24 po/de.po| 24 po/el.po| 24 po/en_GB.po | 24 po/es.po| 24 po/eu.po| 24 po/fi.po| 12 po/fr.po| 24 po/gl.po| 24 po/he.po| 12 po/hr.po| 18 ++ po/hu.po| 24 po/id.po| 24 po/it.po| 24 po/ja.po| 24 po/kk.po| 24 po/ko.po| 24 po/lt.po| 24 po/lv.po| 24 po/nb.po| 12 po/nl.po| 24 po/nn.po| 12 po/pa.po| 12 po/pl.po| 24 po/pt.po| 24 po/pt_BR.po | 24 po/ro.po| 24 po/ru.po| 24 po/si.po| 12 po/sk.po| 24 po/sv.po| 24 po/tr.po| 18 ++ po/ug.po| 24 po/uk.po| 24 po/ur.po| 24 po/ur_PK.po | 24 po/zh_CN.po | 24 po/zh_TW.po | 24 43 files changed, 936 insertions(+), 0 deletions(-) diff --git a/po/ar.po b/po/ar.po index 3972f40..c14164f 100644 --- a/po/ar.po +++ b/po/ar.po @@ -1560,6 +1560,30 @@ msgstr مدير إعدادات رسومي لإكسفس 4 msgid Settings Manager msgstr مدير الإعدادات +# Automatically copied. Please review and remove fuzzy flag. +#: ../dialogs/keyboard-settings/keyboard-dialog.glade.h:4 +#, fuzzy +msgid Change layout option +msgstr تغيير خيارات التخطيط + +# Automatically copied. Please review and remove fuzzy flag. +#: ../dialogs/keyboard-settings/keyboard-dialog.glade.h:5 +#, fuzzy +msgid Compose key +msgstr تكوين موقع المفتاح + +# Automatically copied. Please review and remove fuzzy flag. +#: ../dialogs/keyboard-settings/keyboard-dialog.glade.h:14 +#, fuzzy +msgid Move currently selected item down by one row +msgstr نقل العنصر المحدد حاليا إلى الأسفل بصف واحد + +# Automatically copied. Please review and remove fuzzy flag. +#: ../dialogs/keyboard-settings/keyboard-dialog.glade.h:15 +#, fuzzy +msgid Move currently selected item up by one row +msgstr نقل العنصر المحدد حاليا للأعلى بصف واحد + #~ msgid This property name is not valid. #~ msgstr إسم الخصائص غير سليم. diff --git a/po/ast.po b/po/ast.po index 9d78787..ffe38e1 100644 --- a/po/ast.po +++ b/po/ast.po @@ -1643,6 +1643,30 @@ msgstr Alministrador de configuraci msgid Graphical Settings Manager for Xfce 4 msgstr Xestor gr�ficu de configuraci�n pa Xfce 4 +# Automatically copied. Please review and remove fuzzy flag. +#: ../dialogs/keyboard-settings/keyboard-dialog.glade.h:4 +#, fuzzy +msgid Change layout option +msgstr Camudar opción de distribución + +# Automatically copied. Please review and remove fuzzy flag. +#: ../dialogs/keyboard-settings/keyboard-dialog.glade.h:5 +#, fuzzy +msgid Compose key +msgstr Definir sitiu de tecla + +# Automatically copied. Please review and remove fuzzy flag. +#: ../dialogs/keyboard-settings/keyboard-dialog.glade.h:14 +#, fuzzy +msgid Move currently selected item down by one row +msgstr Desaniciar el panel seleicionáu anguaño + +# Automatically copied. Please review and remove fuzzy flag. +#: ../dialogs/keyboard-settings/keyboard-dialog.glade.h:15 +#, fuzzy +msgid Move currently selected item up by one row +msgstr Desaniciar el panel seleicionáu anguaño + #~ msgid Use this area to _test the settings above: #~ msgstr Usa esti campu pa _prebar la configuraci�n d'enriba: diff --git a/po/bn.po b/po/bn.po index d837beb..809d8eb 100644 --- a/po/bn.po +++ b/po/bn.po @@ -1605,6 +1605,18 @@ msgstr সেটিংস ব্যবস্থাপক msgid Graphical Settings Manager for Xfce 4 msgstr Xfce 4-এর জন্য
[Xfce4-commits] xfce4-settings:master Use more large-grained HAVE_LIBXKLAVIER #ifdef's.
Updating branch refs/heads/master to 3e3005d27e6becc628c42e5975264b47605dcfa8 (commit) from 44bfe286fa5c6e513be324186656873e2c6fda21 (commit) commit 3e3005d27e6becc628c42e5975264b47605dcfa8 Author: Igor Slepchin igor.slepc...@gmail.com Date: Sat Jul 28 01:35:21 2012 -0400 Use more large-grained HAVE_LIBXKLAVIER #ifdef's. Processing xmodmap is the only operational piece of functionality in keyboard-layout.c when libxklavier support is disabled. xfsettingsd/keyboard-layout.c | 25 +++-- 1 files changed, 11 insertions(+), 14 deletions(-) diff --git a/xfsettingsd/keyboard-layout.c b/xfsettingsd/keyboard-layout.c index 6c691f3..6c0f0c3 100644 --- a/xfsettingsd/keyboard-layout.c +++ b/xfsettingsd/keyboard-layout.c @@ -46,6 +46,8 @@ static void xfce_keyboard_layout_helper_finalize (GObject *object); static void xfce_keyboard_layout_helper_process_xmodmap (void); + +#ifdef HAVE_LIBXKLAVIER static void xfce_keyboard_layout_helper_set_model (XfceKeyboardLayoutHelper *helper); static void xfce_keyboard_layout_helper_set_layout (XfceKeyboardLayoutHelper *helper); static void xfce_keyboard_layout_helper_set_variant (XfceKeyboardLayoutHelper *helper); @@ -63,6 +65,7 @@ static GdkFilterReturn handle_xevent (GdkXEvent XfceKeyboardLayoutHelper *helper); static void xfce_keyboard_layout_reset_xkl_config (XklEngine *xklengine, XfceKeyboardLayoutHelper *helper); +#endif /* HAVE_LIBXKLAVIER */ struct _XfceKeyboardLayoutHelperClass { @@ -107,10 +110,12 @@ xfce_keyboard_layout_helper_init (XfceKeyboardLayoutHelper *helper) /* open the channel */ helper-channel = xfconf_channel_get (keyboard-layout); +helper-xkb_disable_settings = xfconf_channel_get_bool (helper-channel, /Default/XkbDisable, TRUE); + +#ifdef HAVE_LIBXKLAVIER /* monitor channel changes */ g_signal_connect (G_OBJECT (helper-channel), property-changed, G_CALLBACK (xfce_keyboard_layout_helper_channel_property_changed), helper); -#ifdef HAVE_LIBXKLAVIER helper-engine = xkl_engine_get_instance (GDK_DISPLAY ()); helper-config = xkl_config_rec_new (); xkl_config_rec_get_from_server (helper-config, helper-engine); @@ -120,15 +125,14 @@ xfce_keyboard_layout_helper_init (XfceKeyboardLayoutHelper *helper) g_signal_connect (helper-engine, X-new-device, G_CALLBACK (xfce_keyboard_layout_reset_xkl_config), helper); xkl_engine_start_listen (helper-engine, XKLL_TRACK_KEYBOARD_STATE); -#endif /* HAVE_LIBXKLAVIER */ /* load settings */ -helper-xkb_disable_settings = xfconf_channel_get_bool (helper-channel, /Default/XkbDisable, TRUE); xfce_keyboard_layout_helper_set_model (helper); xfce_keyboard_layout_helper_set_layout (helper); xfce_keyboard_layout_helper_set_variant (helper); xfce_keyboard_layout_helper_set_grpkey (helper); xfce_keyboard_layout_helper_set_composekey (helper); +#endif /* HAVE_LIBXKLAVIER */ xfce_keyboard_layout_helper_process_xmodmap (); } @@ -136,9 +140,9 @@ xfce_keyboard_layout_helper_init (XfceKeyboardLayoutHelper *helper) static void xfce_keyboard_layout_helper_finalize (GObject *object) { +#ifdef HAVE_LIBXKLAVIER XfceKeyboardLayoutHelper *helper = XFCE_KEYBOARD_LAYOUT_HELPER (object); -#ifdef HAVE_LIBXKLAVIER xkl_engine_stop_listen (helper-engine, XKLL_TRACK_KEYBOARD_STATE); gdk_window_remove_filter (NULL, (GdkFilterFunc) handle_xevent, helper); g_object_unref (helper-config); @@ -178,10 +182,11 @@ xfce_keyboard_layout_helper_process_xmodmap (void) g_free ((gchar*) xmodmap_path); } +#ifdef HAVE_LIBXKLAVIER + static void xfce_keyboard_layout_helper_set_model (XfceKeyboardLayoutHelper *helper) { -#ifdef HAVE_LIBXKLAVIER gchar *xkbmodel; if (!helper-xkb_disable_settings) @@ -207,7 +212,6 @@ xfce_keyboard_layout_helper_set_model (XfceKeyboardLayoutHelper *helper) g_free (xkbmodel); } } -#endif /* HAVE_LIBXKLAVIER */ } static void @@ -216,7 +220,6 @@ xfce_keyboard_layout_helper_set (XfceKeyboardLayoutHelper *helper, gchar ***xkl_config_option, const gchar *debug_name) { -#ifdef HAVE_LIBXKLAVIER gchar *xfconf_values, *xkl_values; gchar **values; @@ -239,7 +242,6 @@ xfce_keyboard_layout_helper_set (XfceKeyboardLayoutHelper *helper, g_free (xfconf_values); g_free (xkl_values); } -#endif /* HAVE_LIBXKLAVIER */ } static void @@ -305,7 +307,6 @@ xfce_keyboard_layout_helper_set_option (XfceKeyboardLayoutHelper *helper, const
[Xfce4-commits] xfce4-settings:master Code style fixes.
Updating branch refs/heads/master to 1d5d93c03ad5bb05691f0448ff8b58b777db36c3 (commit) from 3e3005d27e6becc628c42e5975264b47605dcfa8 (commit) commit 1d5d93c03ad5bb05691f0448ff8b58b777db36c3 Author: Igor Slepchin igor.slepc...@gmail.com Date: Wed Aug 22 16:39:33 2012 -0400 Code style fixes. dialogs/keyboard-settings/xfce-keyboard-settings.c |8 xfsettingsd/keyboard-layout.c | 20 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c b/dialogs/keyboard-settings/xfce-keyboard-settings.c index cc7e81c..134e766 100644 --- a/dialogs/keyboard-settings/xfce-keyboard-settings.c +++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c @@ -1175,7 +1175,7 @@ xfce_keyboard_settings_set_layout (XfceKeyboardSettings *settings) XKB_TREE_LAYOUTS, val_layout, XKB_TREE_VARIANTS, val_variant, -1); if (val_variant == NULL) - val_variant = g_strdup(); + val_variant = g_strdup (); if (val_layout) { @@ -1199,7 +1199,7 @@ xfce_keyboard_settings_set_layout (XfceKeyboardSettings *settings) XKB_TREE_LAYOUTS, val_layout, XKB_TREE_VARIANTS, val_variant, -1); if (val_variant == NULL) - val_variant = g_strdup(); + val_variant = g_strdup (); if (val_layout) { @@ -1601,7 +1601,7 @@ static void xfce_keyboard_settings_up_layout_button_cb (GtkWidget *widget, XfceKeyboardSettings *settings) { -xfce_keyboard_settings_layout_move(widget, settings, MOVE_LAYOUT_UP); +xfce_keyboard_settings_layout_move (widget, settings, MOVE_LAYOUT_UP); } @@ -1610,7 +1610,7 @@ static void xfce_keyboard_settings_down_layout_button_cb (GtkWidget *widget, XfceKeyboardSettings *settings) { -xfce_keyboard_settings_layout_move(widget, settings, MOVE_LAYOUT_DOWN); +xfce_keyboard_settings_layout_move (widget, settings, MOVE_LAYOUT_DOWN); } diff --git a/xfsettingsd/keyboard-layout.c b/xfsettingsd/keyboard-layout.c index 6c0f0c3..f4ee672 100644 --- a/xfsettingsd/keyboard-layout.c +++ b/xfsettingsd/keyboard-layout.c @@ -225,14 +225,14 @@ xfce_keyboard_layout_helper_set (XfceKeyboardLayoutHelper *helper, if (!helper-xkb_disable_settings) { -xfconf_values = g_strjoinv(,, *xkl_config_option); +xfconf_values = g_strjoinv (,, *xkl_config_option); xkl_values = xfconf_channel_get_string (helper-channel, xfconf_option_name, xfconf_values); if (g_strcmp0 (xfconf_values, xkl_values) != 0) { values = g_strsplit_set (xkl_values, ,, 0); -g_strfreev(*xkl_config_option); +g_strfreev (*xkl_config_option); *xkl_config_option = values; xkl_config_rec_activate (helper-config, helper-engine); @@ -279,7 +279,7 @@ xfce_keyboard_layout_get_option (gchar **options, for (iter = options; iter *iter; iter++) { -if (g_str_has_prefix(*iter, option_name)) +if (g_str_has_prefix (*iter, option_name)) { option_value = *iter; } @@ -288,13 +288,13 @@ xfce_keyboard_layout_get_option (gchar **options, gchar *tmp = other_options; if (other_options) { -other_options = g_strconcat(other_options, ,, *iter, NULL); +other_options = g_strconcat (other_options, ,, *iter, NULL); } else { -other_options = g_strdup(*iter); +other_options = g_strdup (*iter); } -g_free(tmp); +g_free (tmp); } } @@ -327,23 +327,23 @@ xfce_keyboard_layout_helper_set_option (XfceKeyboardLayoutHelper *helper, } else { -if (strlen(option_value) != 0) +if (strlen (option_value) != 0) { options_string = g_strconcat (option_value, ,, other_options, NULL); } else { -options_string = strdup(other_options); +options_string = strdup (other_options); } } g_strfreev (helper-config-options); -helper-config-options = g_strsplit(options_string, ,, 0); +helper-config-options = g_strsplit (options_string, ,, 0); xkl_config_rec_activate (helper-config, helper-engine); xfsettings_dbg (XFSD_DEBUG_KEYBOARD_LAYOUT, set %s to \%s\, xkb_option_name, option_value); -g_free(options_string); +g_free (options_string); } g_free (other_options
[Xfce4-commits] xfce4-xkb-plugin:master Make some variables and functions static.
Updating branch refs/heads/master to b91c324265bcf113bfd7126f97f82f82264711c7 (commit) from ae072268976b0f8ae0602581a338c7500f2c80f6 (commit) commit b91c324265bcf113bfd7126f97f82f82264711c7 Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Jul 10 09:53:11 2012 -0400 Make some variables and functions static. panel-plugin/xkb-config.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c index 2c5af77..c4af868 100644 --- a/panel-plugin/xkb-config.c +++ b/panel-plugin/xkb-config.c @@ -64,16 +64,17 @@ typedef struct XklConfigRec *config_rec; } t_xkb_config; -t_xkb_config *config; +static t_xkb_config *config; -voidxkb_config_state_changed(XklEngine *engine, +static void xkb_config_state_changed(XklEngine *engine, XklEngineStateChange *change, gint group, gboolean restore); -voidxkb_config_xkl_config_changed (XklEngine *engine); +static void xkb_config_xkl_config_changed (XklEngine *engine); -GdkFilterReturn handle_xevent (GdkXEvent * xev, +static GdkFilterReturn +handle_xevent (GdkXEvent * xev, GdkEvent * event); voidxkb_config_update_configuration (t_xkb_settings *settings); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Remove some unused/no-op code.
Updating branch refs/heads/master to 3c296061aa1236bebea89a51af8802603123da14 (commit) from b91c324265bcf113bfd7126f97f82f82264711c7 (commit) commit 3c296061aa1236bebea89a51af8802603123da14 Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Jul 10 09:54:19 2012 -0400 Remove some unused/no-op code. Make handling of layout variants with the same name more straightforward (i.e., use their group ids as keys in variant_index_by_group rather than addresses of their string names). panel-plugin/xkb-config.c | 24 ++-- 1 files changed, 2 insertions(+), 22 deletions(-) diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c index c4af868..43de210 100644 --- a/panel-plugin/xkb-config.c +++ b/panel-plugin/xkb-config.c @@ -77,7 +77,6 @@ static GdkFilterReturn handle_xevent (GdkXEvent * xev, GdkEvent * event); -voidxkb_config_update_configuration (t_xkb_settings *settings); static void xkb_config_free (); static void xkb_config_initialize_xkb_options (t_xkb_settings *settings); @@ -126,8 +125,6 @@ xkb_config_initialize (t_xkb_settings *settings, static void xkb_config_initialize_xkb_options (t_xkb_settings *settings) { -XklConfigRegistry *registry; -XklConfigItem *config_item; GHashTable *index_variants; gchar **group; gint val, i; @@ -146,12 +143,6 @@ xkb_config_initialize_xkb_options (t_xkb_settings *settings) config-window_map = g_hash_table_new (g_direct_hash, NULL); config-application_map = g_hash_table_new (g_direct_hash, NULL); -registry = xkl_config_registry_get_instance (config-engine); -xkl_config_registry_load (registry, FALSE); -g_object_unref (registry); - -config_item = xkl_config_item_new (); - config-group_names = (gchar **) g_new0 (typeof (gchar **), config-group_count); config-variants = (gchar **) g_new0 (typeof (gchar **), config-group_count); config-variant_index_by_group = g_hash_table_new (NULL, NULL); @@ -160,13 +151,8 @@ xkb_config_initialize_xkb_options (t_xkb_settings *settings) for (i = 0; i config-group_count; i++) { -g_stpcpy (config_item-name, config-config_rec-layouts[i]); config-group_names[i] = g_strdup (config-config_rec-layouts[i]); -if (config-config_rec-variants[i] != NULL) -{ -g_stpcpy (config_item-name, config-config_rec-variants[i]); -} config-variants[i] = (config-config_rec-variants[i] == NULL) ? g_strdup () : g_strdup (config-config_rec-variants[i]); @@ -178,7 +164,7 @@ xkb_config_initialize_xkb_options (t_xkb_settings *settings) val++; g_hash_table_insert ( config-variant_index_by_group, -config-group_names[i], +GINT_TO_POINTER (i), GINT_TO_POINTER (val) ); g_hash_table_insert ( @@ -188,7 +174,6 @@ xkb_config_initialize_xkb_options (t_xkb_settings *settings) ); } g_hash_table_destroy (index_variants); -g_object_unref (config_item); } void @@ -408,7 +393,6 @@ xkb_config_window_changed (guint new_window_id, guint application_id) gpointer key, value; GHashTable *hashtable; guint id; -gint DEBUG_FOUND = 0; g_assert (config != NULL); @@ -438,7 +422,6 @@ xkb_config_window_changed (guint new_window_id, guint application_id) if (g_hash_table_lookup_extended (hashtable, GINT_TO_POINTER (id), key, value)) { group = GPOINTER_TO_INT (value); -DEBUG_FOUND = 1; } g_hash_table_insert ( @@ -579,17 +562,14 @@ xkb_config_variant_index_for_group (gint group) { gpointer presult; gint result; -gchar *key; g_return_val_if_fail (config != NULL, 0); if (group == -1) group = xkb_config_get_current_group (); -key = config-group_names[group]; - presult = g_hash_table_lookup ( config-variant_index_by_group, -key +GINT_TO_POINTER (group) ); if (presult == NULL) return 0; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Remove configuration of keyboard layouts.
Updating branch refs/heads/master to fb667951f66a05b87949b3eaf9e7c04697899fea (commit) from 3c296061aa1236bebea89a51af8802603123da14 (commit) commit fb667951f66a05b87949b3eaf9e7c04697899fea Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Jul 17 16:13:40 2012 -0400 Remove configuration of keyboard layouts. Keyboard layouts are moved to xfce4-keyboard-settings. The management of layouts per application/window is still handled by this plugin. Compose key configuration is gone for now; might get reinstated in xfce4-keyboard-settings. This fixes bug 5476 (together with a corresponding commit to xfce4-settings). panel-plugin/xfce4-xkb-plugin.c| 45 +-- panel-plugin/xfce4-xkb-plugin.h| 17 - panel-plugin/xkb-config.c | 143 +-- panel-plugin/xkb-config.h | 13 - panel-plugin/xkb-settings-dialog.c | 803 5 files changed, 20 insertions(+), 1001 deletions(-) diff --git a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c index 6a0635a..1cf96ae 100644 --- a/panel-plugin/xfce4-xkb-plugin.c +++ b/panel-plugin/xfce4-xkb-plugin.c @@ -225,9 +225,6 @@ xkb_free (t_xkb *xkb) { xkb_config_finalize (); -if (xkb-settings-kbd_config) -kbd_config_free (xkb-settings-kbd_config); - g_free (xkb-settings); gtk_widget_destroy (xkb-layout_image); @@ -263,23 +260,6 @@ xfce_xkb_save_config (XfcePanelPlugin *plugin, t_xkb *xkb) xfce_rc_write_int_entry (rcfile, display_type, xkb-display_type); xfce_rc_write_int_entry (rcfile, display_textsize, xkb-display_textsize); xfce_rc_write_int_entry (rcfile, group_policy, xkb-settings-group_policy); -xfce_rc_write_int_entry (rcfile, default_group, xkb-settings-default_group); -xfce_rc_write_bool_entry (rcfile, never_modify_config, xkb-settings-never_modify_config); - -if (xkb-settings-kbd_config != NULL) -{ -xfce_rc_write_entry (rcfile, model, xkb-settings-kbd_config-model); -xfce_rc_write_entry (rcfile, layouts, xkb-settings-kbd_config-layouts); -xfce_rc_write_entry (rcfile, variants, xkb-settings-kbd_config-variants); - -if (xkb-settings-kbd_config-toggle_option == NULL) -xfce_rc_write_entry (rcfile, toggle_option, ); -else xfce_rc_write_entry (rcfile, toggle_option, xkb-settings-kbd_config-toggle_option); - -if (xkb-settings-kbd_config-compose_key_position == NULL) -xfce_rc_write_entry (rcfile, compose_key_position, ); -else xfce_rc_write_entry (rcfile, compose_key_position, xkb-settings-kbd_config-compose_key_position); -} xfce_rc_close (rcfile); g_free (filename); @@ -297,23 +277,6 @@ xkb_load_config (t_xkb *xkb, const gchar *filename) xkb-display_textsize = xfce_rc_read_int_entry (rcfile, display_textsize, DISPLAY_TEXTSIZE_SMALL); xkb-settings-group_policy = xfce_rc_read_int_entry (rcfile, group_policy, GROUP_POLICY_PER_APPLICATION); -if (xkb-settings-group_policy != GROUP_POLICY_GLOBAL) -{ -xkb-settings-default_group = xfce_rc_read_int_entry (rcfile, default_group, 0); -} - -xkb-settings-never_modify_config = xfce_rc_read_bool_entry (rcfile, never_modify_config, FALSE); - -if (xkb-settings-kbd_config == NULL) -{ -xkb-settings-kbd_config = g_new0 (t_xkb_kbd_config, 1); -} -xkb-settings-kbd_config-model = g_strdup (xfce_rc_read_entry (rcfile, model, NULL)); -xkb-settings-kbd_config-layouts = g_strdup (xfce_rc_read_entry (rcfile, layouts, NULL)); -xkb-settings-kbd_config-variants = g_strdup (xfce_rc_read_entry (rcfile, variants, NULL)); -xkb-settings-kbd_config-toggle_option = g_strdup (xfce_rc_read_entry (rcfile, toggle_option, NULL)); -xkb-settings-kbd_config-compose_key_position = g_strdup (xfce_rc_read_entry (rcfile, compose_key_position, NULL)); - xfce_rc_close (rcfile); return TRUE; @@ -328,8 +291,6 @@ xkb_load_default (t_xkb *xkb) xkb-display_type = DISPLAY_TYPE_IMAGE; xkb-display_textsize = DISPLAY_TEXTSIZE_SMALL; xkb-settings-group_policy = GROUP_POLICY_PER_APPLICATION; -xkb-settings-default_group = 0; -xkb-settings-kbd_config = NULL; } static gboolean @@ -360,7 +321,7 @@ xkb_calculate_sizes (t_xkb *xkb, GtkOrientation orientation, gint panel_size) static void xkb_initialize_menu (t_xkb *xkb) { -gint i; +gint i, group_count; RsvgHandle *handle; GdkPixbuf *pixbuf, *tmp; gchar *imgfilename; @@ -373,7 +334,8 @@ xkb_initialize_menu (t_xkb *xkb) gtk_widget_destroy (xkb-popup); xkb-popup = gtk_menu_new (); -for (i = 0; i xkb_config_get_group_count (); i++) +group_count = xkb_config_get_group_count (); +for (i = 0; i group_count; i++) { gchar *layout_string; @@ -407,6 +369,7 @@ xkb_initialize_menu
[Xfce4-commits] xfce4-xkb-plugin:master Fix prototypes of X-state-changed and X-config-changed callbacks.
Updating branch refs/heads/master to a29286c138b5bf6d041c099237b34ffad24eff12 (commit) from fb667951f66a05b87949b3eaf9e7c04697899fea (commit) commit a29286c138b5bf6d041c099237b34ffad24eff12 Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Jul 17 17:46:25 2012 -0400 Fix prototypes of X-state-changed and X-config-changed callbacks. panel-plugin/xkb-config.c | 15 +-- 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c index 9583bfd..8c43b7d 100644 --- a/panel-plugin/xkb-config.c +++ b/panel-plugin/xkb-config.c @@ -64,11 +64,13 @@ typedef struct static t_xkb_config *config; static void xkb_config_state_changed(XklEngine *engine, - XklEngineStateChange *change, + XklEngineStateChange change, gint group, - gboolean restore); + gboolean restore, + gpointer user_data); -static void xkb_config_xkl_config_changed (XklEngine *engine); +static void xkb_config_xkl_config_changed (XklEngine *engine, + gpointer user_data); static GdkFilterReturn handle_xevent (GdkXEvent * xev, @@ -405,9 +407,10 @@ xkb_config_get_variant (gint group) void xkb_config_state_changed (XklEngine *engine, - XklEngineStateChange *change, + XklEngineStateChange change, gint group, - gboolean restore) + gboolean restore, + gpointer user_data) { if (change == GROUP_CHANGED) { @@ -438,7 +441,7 @@ xkb_config_state_changed (XklEngine *engine, } void -xkb_config_xkl_config_changed (XklEngine *engine) +xkb_config_xkl_config_changed (XklEngine *engine, gpointer user_data) { xkb_config_update_settings (config-settings); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Fix memory corruption.
Updating branch refs/heads/master to ac73bc9de624d322b318c2eda0ace7f0bee97a64 (commit) from a29286c138b5bf6d041c099237b34ffad24eff12 (commit) commit ac73bc9de624d322b318c2eda0ace7f0bee97a64 Author: Igor Slepchin igor.slepc...@gmail.com Date: Thu Jul 19 01:59:40 2012 -0400 Fix memory corruption. g_free(c) in the original code was freeing memory at the pointer that was incremented a few times since the allocation. This is similar to ubuntu bug #899290 and fedora bug 589898. panel-plugin/xkb-util.c | 15 +++ 1 files changed, 3 insertions(+), 12 deletions(-) diff --git a/panel-plugin/xkb-util.c b/panel-plugin/xkb-util.c index d0d0230..324928f 100644 --- a/panel-plugin/xkb-util.c +++ b/panel-plugin/xkb-util.c @@ -66,11 +66,10 @@ xkb_util_get_layout_string (const gchar *group_name, const gchar *variant) gchar* xkb_util_normalize_group_name (const gchar* group_name) { -gchar *c; +const gchar *c; gchar *result; gint cut_length; gint index_of_na = -1; -gint index_tmp = -1; if (!group_name) return NULL; @@ -78,27 +77,19 @@ xkb_util_normalize_group_name (const gchar* group_name) if (strlen (group_name) = 3) return g_strdup (group_name); -c = g_strdup (group_name); - -while (*c) +for (c = group_name; *c; c++) { -index_tmp++; - if (!((*c = 'a' *c = 'z') || (*c = 'A' *c = 'Z'))) { -index_of_na = index_tmp; +index_of_na = group_name - c; break; } - -c++; } cut_length = (index_of_na != -1 index_of_na = 3) ? index_of_na : 3; result = g_strndup (group_name, cut_length); -g_free (c); - return result; } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Add license and plugin version to the About dialog.
Updating branch refs/heads/master to ffbcc2b8473cd1b2896b11c4b1c6f2e226ec1cd8 (commit) from ac73bc9de624d322b318c2eda0ace7f0bee97a64 (commit) commit ffbcc2b8473cd1b2896b11c4b1c6f2e226ec1cd8 Author: Igor Slepchin igor.slepc...@gmail.com Date: Thu Jul 19 16:47:59 2012 -0400 Add license and plugin version to the About dialog. Also, let the compiler determine the length of authors array. panel-plugin/xkb-settings-dialog.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/panel-plugin/xkb-settings-dialog.c b/panel-plugin/xkb-settings-dialog.c index 18851f1..42b9d0c 100644 --- a/panel-plugin/xkb-settings-dialog.c +++ b/panel-plugin/xkb-settings-dialog.c @@ -175,7 +175,7 @@ void xfce_xkb_about (XfcePanelPlugin *plugin) { GtkWidget *about; -const gchar* authors[3] = { +const gchar* authors[] = { Alexander Iliev sasoil...@mamul.org, Gauvain Pocentek gauvainpocen...@gmail.com, NULL @@ -184,8 +184,12 @@ xfce_xkb_about (XfcePanelPlugin *plugin) about = gtk_about_dialog_new (); gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (about), _(Keyboard Layouts Plugin)); +gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (about), +PACKAGE_VERSION); gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG (about), NULL); +gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (about), +xfce_get_license_text (XFCE_LICENSE_TEXT_GPL)); gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (about), (const gchar**) authors); gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG (about), ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Look for .rc file in system dirs as well.
Updating branch refs/heads/master to cb50bc31797bf34d4896fefdcd4c99641131854a (commit) from 16f933d1e3d83093dc67f35dec9011b33d501f8f (commit) commit cb50bc31797bf34d4896fefdcd4c99641131854a Author: Szalai Bandi szalai.ba...@gmail.com Date: Mon Jul 23 14:33:07 2012 -0400 Look for .rc file in system dirs as well. The patch is from bug 3263. panel-plugin/xfce4-xkb-plugin.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c index d72713b..74e07ed 100644 --- a/panel-plugin/xfce4-xkb-plugin.c +++ b/panel-plugin/xfce4-xkb-plugin.c @@ -167,7 +167,7 @@ xkb_new (XfcePanelPlugin *plugin) xkb = panel_slice_new0 (t_xkb); xkb-plugin = plugin; -filename = xfce_panel_plugin_save_location (plugin, TRUE); +filename = xfce_panel_plugin_lookup_rc_file (plugin); if ((!filename) || (!xkb_load_config (xkb, filename))) { xkb_load_default (xkb); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Reset the current group to 0 whenever config change is detected.
Updating branch refs/heads/master to d7490a02ab8cd69a6e161e160f76adc2a600105e (commit) from cb50bc31797bf34d4896fefdcd4c99641131854a (commit) commit d7490a02ab8cd69a6e161e160f76adc2a600105e Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon Jul 23 14:34:40 2012 -0400 Reset the current group to 0 whenever config change is detected. This avoids some weirdness when the layout change causes the current group to change/disappear. Besides, we're resetting the rest of the settings anyway. panel-plugin/xkb-config.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c index b0fdb84..f8c5b65 100644 --- a/panel-plugin/xkb-config.c +++ b/panel-plugin/xkb-config.c @@ -446,7 +446,10 @@ xkb_config_xkl_config_changed (XklEngine *engine, gpointer user_data) xkb_config_update_from_xkl (); if (config-callback != NULL) -config-callback (xkb_config_get_current_group (), TRUE, config-callback_data); +{ +xkb_config_set_group (0); +config-callback (0, TRUE, config-callback_data); +} } gint ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Cleanup.
Updating branch refs/heads/master to 16f933d1e3d83093dc67f35dec9011b33d501f8f (commit) from ffbcc2b8473cd1b2896b11c4b1c6f2e226ec1cd8 (commit) commit 16f933d1e3d83093dc67f35dec9011b33d501f8f Author: Igor Slepchin igor.slepc...@gmail.com Date: Sat Jul 21 04:02:29 2012 -0400 Cleanup. Get rid of t_xkb_settings struct; keep its only member (group_policy) in t_xkb struct directly instead. Declare xkb_plugin_popup_menu() as static. Get rid of a few superfluous UI refreshes. panel-plugin/xfce4-xkb-plugin.c| 22 panel-plugin/xfce4-xkb-plugin.h|2 +- panel-plugin/xkb-callbacks.c |5 ++- panel-plugin/xkb-callbacks.h |3 -- panel-plugin/xkb-config.c | 64 ++-- panel-plugin/xkb-config.h |9 + panel-plugin/xkb-settings-dialog.c | 16 ++--- 7 files changed, 50 insertions(+), 71 deletions(-) diff --git a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c index 1cf96ae..d72713b 100644 --- a/panel-plugin/xfce4-xkb-plugin.c +++ b/panel-plugin/xfce4-xkb-plugin.c @@ -75,7 +75,7 @@ static gboolean xkb_load_config (t_xkb *xkb, static void xkb_load_default(t_xkb *xkb); -static void xkb_initialize_menu (t_xkb *xkb); +static void xkb_initialize_popup_menu (t_xkb *xkb); /* == * @@ -145,7 +145,7 @@ xkb_state_changed (gint current_group, gboolean config_changed, if (config_changed) { -xkb_initialize_menu (xkb); +xkb_initialize_popup_menu (xkb); } } @@ -165,7 +165,6 @@ xkb_new (XfcePanelPlugin *plugin) WnckScreen *wnck_screen; xkb = panel_slice_new0 (t_xkb); -xkb-settings = g_new0 (t_xkb_settings, 1); xkb-plugin = plugin; filename = xfce_panel_plugin_save_location (plugin, TRUE); @@ -202,11 +201,11 @@ xkb_new (XfcePanelPlugin *plugin) G_CALLBACK (xkb_plugin_layout_image_exposed), xkb); gtk_widget_show (GTK_WIDGET (xkb-layout_image)); -if (xkb_config_initialize (xkb-settings, xkb_state_changed, xkb)) +if (xkb_config_initialize (xkb-group_policy, xkb_state_changed, xkb)) { xkb_refresh_gui (xkb); -xkb_initialize_menu (xkb); +xkb_initialize_popup_menu (xkb); } wnck_screen = wnck_screen_get_default (); @@ -225,8 +224,6 @@ xkb_free (t_xkb *xkb) { xkb_config_finalize (); -g_free (xkb-settings); - gtk_widget_destroy (xkb-layout_image); gtk_widget_destroy (xkb-btn); gtk_widget_destroy (xkb-popup); @@ -240,8 +237,6 @@ xfce_xkb_save_config (XfcePanelPlugin *plugin, t_xkb *xkb) gchar* filename; XfceRc* rcfile; -xkb_config_update_settings (xkb-settings); -xkb_initialize_menu (xkb); filename = xfce_panel_plugin_save_location (plugin, TRUE); if (!filename) @@ -259,7 +254,7 @@ xfce_xkb_save_config (XfcePanelPlugin *plugin, t_xkb *xkb) xfce_rc_write_int_entry (rcfile, display_type, xkb-display_type); xfce_rc_write_int_entry (rcfile, display_textsize, xkb-display_textsize); -xfce_rc_write_int_entry (rcfile, group_policy, xkb-settings-group_policy); +xfce_rc_write_int_entry (rcfile, group_policy, xkb-group_policy); xfce_rc_close (rcfile); g_free (filename); @@ -275,7 +270,7 @@ xkb_load_config (t_xkb *xkb, const gchar *filename) xkb-display_type = xfce_rc_read_int_entry (rcfile, display_type, DISPLAY_TYPE_IMAGE); xkb-display_textsize = xfce_rc_read_int_entry (rcfile, display_textsize, DISPLAY_TEXTSIZE_SMALL); -xkb-settings-group_policy = xfce_rc_read_int_entry (rcfile, group_policy, GROUP_POLICY_PER_APPLICATION); +xkb-group_policy = xfce_rc_read_int_entry (rcfile, group_policy, GROUP_POLICY_PER_APPLICATION); xfce_rc_close (rcfile); @@ -290,7 +285,7 @@ xkb_load_default (t_xkb *xkb) { xkb-display_type = DISPLAY_TYPE_IMAGE; xkb-display_textsize = DISPLAY_TEXTSIZE_SMALL; -xkb-settings-group_policy = GROUP_POLICY_PER_APPLICATION; +xkb-group_policy = GROUP_POLICY_PER_APPLICATION; } static gboolean @@ -319,7 +314,7 @@ xkb_calculate_sizes (t_xkb *xkb, GtkOrientation orientation, gint panel_size) } static void -xkb_initialize_menu (t_xkb *xkb) +xkb_initialize_popup_menu (t_xkb *xkb) { gint i, group_count; RsvgHandle *handle; @@ -377,7 +372,6 @@ xkb_initialize_menu (t_xkb *xkb) gtk_menu_shell_append (GTK_MENU_SHELL (xkb-popup), menu_item); } - } void diff --git a/panel-plugin/xfce4-xkb-plugin.h b/panel-plugin/xfce4-xkb-plugin.h index 4cd9a4a..68f6c8a 100644 --- a/panel-plugin/xfce4-xkb-plugin.h +++ b/panel-plugin/xfce4-xkb-plugin.h @@ -61,7 +61,7 @@ typedef struct t_display_type display_type; /* display layout as image ot text */ t_display_textsize display_textsize
[Xfce4-commits] xfce4-xkb-plugin:master Add panel menu item for launching xfce4-keyboard-settings.
Updating branch refs/heads/master to 7def538702e33dac1477692721d337ca1d6629e8 (commit) from d7490a02ab8cd69a6e161e160f76adc2a600105e (commit) commit 7def538702e33dac1477692721d337ca1d6629e8 Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon Jul 23 20:09:11 2012 -0400 Add panel menu item for launching xfce4-keyboard-settings. Is there a better way to launch a .desktop entry? panel-plugin/xfce4-xkb-plugin.c | 43 +++ po/POTFILES.in |1 + 2 files changed, 44 insertions(+), 0 deletions(-) diff --git a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c index 74e07ed..c8fba66 100644 --- a/panel-plugin/xfce4-xkb-plugin.c +++ b/panel-plugin/xfce4-xkb-plugin.c @@ -77,6 +77,9 @@ static void xkb_load_default (t_xkb *xkb); static void xkb_initialize_popup_menu (t_xkb *xkb); +static void xfce_xkb_configure_layout (GtkWidget *widget, + gpointer user_data); + /* == * *Implementation * @@ -87,7 +90,13 @@ XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL (xfce_xkb_construct); static void xfce_xkb_construct (XfcePanelPlugin *plugin) { +GtkWidget *configure_layouts; +GtkIconTheme *theme; +GtkWidget *image; +GdkPixbuf *pixbuf; + t_xkb *xkb = xkb_new (plugin); + xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, UTF-8); g_signal_connect (plugin, orientation-changed, @@ -110,6 +119,27 @@ xfce_xkb_construct (XfcePanelPlugin *plugin) g_signal_connect (plugin, about, G_CALLBACK (xfce_xkb_about), xkb); +configure_layouts = +gtk_image_menu_item_new_with_label (_(Keyboard settings)); + +theme = gtk_icon_theme_get_for_screen (gdk_screen_get_default()); +pixbuf = gtk_icon_theme_load_icon (theme, preferences-desktop-keyboard, + GTK_ICON_SIZE_MENU, 0, NULL); +if (pixbuf != NULL) +{ +image = gtk_image_new (); +gtk_image_set_from_pixbuf (GTK_IMAGE (image), pixbuf); +gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (configure_layouts), + image); +g_object_unref (pixbuf); +} + +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 (xfce_xkb_configure_layout), NULL); } static void @@ -382,3 +412,16 @@ xkb_refresh_gui (t_xkb *xkb) xkb-button_hsize, xkb-button_vsize); } +static void +xfce_xkb_configure_layout (GtkWidget *widget, + gpointer user_data) +{ +gchar *desktop_file = xfce_resource_lookup (XFCE_RESOURCE_DATA, + applications/xfce-keyboard-settings.desktop); +gchar command[1024]; +snprintf (command, sizeof (command), exo-open %s, desktop_file); +command[sizeof (command) - 1] = '\0'; +xfce_spawn_command_line_on_screen (gdk_screen_get_default (), + command, False, True, NULL); +g_free (desktop_file); +} diff --git a/po/POTFILES.in b/po/POTFILES.in index 7b48744..da1b0ae 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,6 +1,7 @@ # List of source files containing translatable strings. panel-plugin/xkb-settings-dialog.c +panel-plugin/xfce4-xkb-plugin.c # files added by intltool-prepare. panel-plugin/xkb-plugin.desktop.in.in ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Delete an unused function.
Updating branch refs/heads/master to 67c86b0294aa5f79f14f122be94dcc5aae68c5cf (commit) from 7def538702e33dac1477692721d337ca1d6629e8 (commit) commit 67c86b0294aa5f79f14f122be94dcc5aae68c5cf Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Jul 24 01:15:13 2012 -0400 Delete an unused function. panel-plugin/xkb-config.c |8 panel-plugin/xkb-config.h |1 - 2 files changed, 0 insertions(+), 9 deletions(-) diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c index f8c5b65..63f5108 100644 --- a/panel-plugin/xkb-config.c +++ b/panel-plugin/xkb-config.c @@ -496,11 +496,3 @@ xkb_config_get_xkl_registry (void) return registry; } -gint -xkb_config_get_max_layout_number (void) -{ -if (config == NULL) return 0; - -return xkl_engine_get_max_num_groups (config-engine); -} - diff --git a/panel-plugin/xkb-config.h b/panel-plugin/xkb-config.h index dbdb974..0eee773 100644 --- a/panel-plugin/xkb-config.h +++ b/panel-plugin/xkb-config.h @@ -66,7 +66,6 @@ void xkb_config_window_closed (guint window_id); /* TODO: remove this function - xkl structures should not be used outside xkb-config */ XklConfigRegistry* xkb_config_get_xkl_registry (void); -gint xkb_config_get_max_layout_number(void); #ifdef DEBUG ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Pre-create country flag pixbufs whenever config changes.
Updating branch refs/heads/master to 47e9bac2f8b29fc04c2a0d60ce8ebc85bcc18722 (commit) from 67c86b0294aa5f79f14f122be94dcc5aae68c5cf (commit) commit 47e9bac2f8b29fc04c2a0d60ce8ebc85bcc18722 Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Jul 24 15:05:39 2012 -0400 Pre-create country flag pixbufs whenever config changes. This is a fairly slow operation; this change speeds up country flag redraws on group change fairly noticeably for more complex svgs. Pre-create the displayed layout name strings as well while at it. We'll also now keep track of the current layout group based on xkl state updates rather than querying xklavier every time. panel-plugin/xkb-callbacks.c | 31 ++--- panel-plugin/xkb-config.c| 102 ++ panel-plugin/xkb-config.h|4 ++ 3 files changed, 82 insertions(+), 55 deletions(-) diff --git a/panel-plugin/xkb-callbacks.c b/panel-plugin/xkb-callbacks.c index e300989..87fb638 100644 --- a/panel-plugin/xkb-callbacks.c +++ b/panel-plugin/xkb-callbacks.c @@ -198,33 +198,12 @@ xkb_plugin_set_tooltip (GtkWidget *widget, GtkTooltip *tooltip, t_xkb *xkb) { -RsvgHandle *handle; -GdkPixbuf *pixbuf, *tmp; -gchar *imgfilename; -gchar *text; +gint group = xkb_config_get_current_group (); +GdkPixbuf *pixbuf = xkb_config_get_tooltip_pixbuf (group); +gchar *layout_name = xkb_config_get_pretty_layout_name (group); -imgfilename = xkb_util_get_flag_filename (xkb_config_get_group_name (-1)); -handle = rsvg_handle_new_from_file (imgfilename, NULL); -g_free (imgfilename); - -if (handle) -{ -tmp = rsvg_handle_get_pixbuf (handle); -pixbuf = gdk_pixbuf_scale_simple (tmp, 24, 24, GDK_INTERP_BILINEAR); -gtk_tooltip_set_icon (tooltip, pixbuf); - -g_object_unref (pixbuf); -g_object_unref (tmp); -g_object_unref (handle); -} -else -gtk_tooltip_set_icon (tooltip, NULL); - -text = xkb_util_get_layout_string (xkb_config_get_group_name (-1), - xkb_config_get_variant (-1)); - -gtk_tooltip_set_text (tooltip, text); -g_free (text); +gtk_tooltip_set_icon (tooltip, pixbuf); +gtk_tooltip_set_text (tooltip, layout_name); return TRUE; } diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c index 63f5108..6acd315 100644 --- a/panel-plugin/xkb-config.c +++ b/panel-plugin/xkb-config.c @@ -24,6 +24,7 @@ */ #include xkb-config.h +#include xkb-util.h #include stdio.h #include stdlib.h @@ -34,6 +35,7 @@ #include glib.h #include gtk/gtk.h #include gdk/gdkx.h +#include librsvg/rsvg.h #ifndef DEBUG #define G_DISABLE_ASSERT @@ -41,14 +43,21 @@ typedef struct { +gchar *group_name; +gchar *variant; +gchar *pretty_layout_name; +GdkPixbuf *tooltip_pixbuf; +} t_group_data; + +typedef struct +{ XklEngine*engine; -gchar **group_names; -gchar **variants; +t_group_data *group_data; + t_group_policygroup_policy; GHashTable *variant_index_by_group; - GHashTable *application_map; GHashTable *window_map; @@ -56,6 +65,7 @@ typedef struct guint current_application_id; gint group_count; +gint current_group; XkbCallback callback; gpointer callback_data; @@ -127,6 +137,7 @@ xkb_config_initialize_xkb_options (const XklConfigRec *config_rec) gchar **group; gint val, i; gpointer pval; +gchar *imgfilename; xkb_config_free (); @@ -140,23 +151,24 @@ xkb_config_initialize_xkb_options (const XklConfigRec *config_rec) config-window_map = g_hash_table_new (g_direct_hash, NULL); config-application_map = g_hash_table_new (g_direct_hash, NULL); - -config-group_names = (gchar **) g_new0 (typeof (gchar **), config-group_count); -config-variants = (gchar **) g_new0 (typeof (gchar **), config-group_count); +config-group_data = (t_group_data *) g_new0 (typeof (t_group_data), + config-group_count); config-variant_index_by_group = g_hash_table_new (NULL, NULL); index_variants = g_hash_table_new (g_str_hash, g_str_equal); for (i = 0; i config-group_count; i++) { +t_group_data *group_data = config-group_data[i]; +RsvgHandle *handle; -config-group_names[i] = g_strdup (config_rec-layouts[i]); +group_data-group_name = g_strdup (config_rec-layouts[i]); -config-variants[i] = (config_rec-variants[i] == NULL) +group_data-variant = (config_rec-variants[i] == NULL) ? g_strdup () : g_strdup (config_rec-variants[i
[Xfce4-commits] xfce4-xkb-plugin:master Plug a memory leak and rename xkb_initialize_popup_menu to xkb_populate_popup_menu.
Updating branch refs/heads/master to 498501367c4cfe96278585e106843f15c072fa6c (commit) from 47e9bac2f8b29fc04c2a0d60ce8ebc85bcc18722 (commit) commit 498501367c4cfe96278585e106843f15c072fa6c Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Jul 24 19:53:24 2012 -0400 Plug a memory leak and rename xkb_initialize_popup_menu to xkb_populate_popup_menu. Layout chooser popup (xkb-popup) is never inserted into any container so we need to take over the ownership of its floating reference. panel-plugin/xfce4-xkb-plugin.c | 30 +- 1 files changed, 21 insertions(+), 9 deletions(-) diff --git a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c index c8fba66..6da99b8 100644 --- a/panel-plugin/xfce4-xkb-plugin.c +++ b/panel-plugin/xfce4-xkb-plugin.c @@ -75,7 +75,9 @@ static gboolean xkb_load_config (t_xkb *xkb, static void xkb_load_default(t_xkb *xkb); -static void xkb_initialize_popup_menu (t_xkb *xkb); +static void xkb_populate_popup_menu (t_xkb *xkb); + +static void xkb_destroy_popup_menu (t_xkb *xkb); static void xfce_xkb_configure_layout (GtkWidget *widget, gpointer user_data); @@ -175,7 +177,7 @@ xkb_state_changed (gint current_group, gboolean config_changed, if (config_changed) { -xkb_initialize_popup_menu (xkb); +xkb_populate_popup_menu (xkb); } } @@ -234,8 +236,7 @@ xkb_new (XfcePanelPlugin *plugin) if (xkb_config_initialize (xkb-group_policy, xkb_state_changed, xkb)) { xkb_refresh_gui (xkb); - -xkb_initialize_popup_menu (xkb); +xkb_populate_popup_menu (xkb); } wnck_screen = wnck_screen_get_default (); @@ -256,7 +257,7 @@ xkb_free (t_xkb *xkb) gtk_widget_destroy (xkb-layout_image); gtk_widget_destroy (xkb-btn); -gtk_widget_destroy (xkb-popup); +xkb_destroy_popup_menu (xkb); panel_slice_free (t_xkb, xkb); } @@ -344,7 +345,19 @@ xkb_calculate_sizes (t_xkb *xkb, GtkOrientation orientation, gint panel_size) } static void -xkb_initialize_popup_menu (t_xkb *xkb) +xkb_destroy_popup_menu (t_xkb *xkb) +{ +if (xkb-popup) +{ +gtk_widget_destroy (xkb-popup); +g_object_ref_sink (xkb-popup); +g_object_unref (xkb-popup); +xkb-popup = NULL; +} +} + +static void +xkb_populate_popup_menu (t_xkb *xkb) { gint i, group_count; RsvgHandle *handle; @@ -355,10 +368,9 @@ xkb_initialize_popup_menu (t_xkb *xkb) if (G_UNLIKELY (xkb == NULL)) return; -if (xkb-popup) -gtk_widget_destroy (xkb-popup); - +xkb_destroy_popup_menu (xkb); xkb-popup = gtk_menu_new (); + group_count = xkb_config_get_group_count (); for (i = 0; i group_count; i++) { ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Use prettier layout names in tooltips and popup menu.
Updating branch refs/heads/master to 74a4232d6b4553d6517ac714223516763c8f6c4f (commit) from 498501367c4cfe96278585e106843f15c072fa6c (commit) commit 74a4232d6b4553d6517ac714223516763c8f6c4f Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Jul 24 23:21:09 2012 -0400 Use prettier layout names in tooltips and popup menu. E.g., Kurdish (Iran, Latin Alt-Q) instead of ir (ku_alt) panel-plugin/xfce4-xkb-plugin.c |5 +-- panel-plugin/xkb-config.c | 61 +- 2 files changed, 60 insertions(+), 6 deletions(-) diff --git a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c index 6da99b8..598d68a 100644 --- a/panel-plugin/xfce4-xkb-plugin.c +++ b/panel-plugin/xfce4-xkb-plugin.c @@ -385,12 +385,9 @@ xkb_populate_popup_menu (t_xkb *xkb) tmp = rsvg_handle_get_pixbuf (handle); } -layout_string = -xkb_util_get_layout_string (xkb_config_get_group_name (i), -xkb_config_get_variant (i)); +layout_string = xkb_config_get_pretty_layout_name (i); menu_item = gtk_image_menu_item_new_with_label (layout_string); -g_free (layout_string); g_signal_connect (G_OBJECT (menu_item), activate, G_CALLBACK (xkb_plugin_set_group), GINT_TO_POINTER (i)); diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c index 6acd315..3967131 100644 --- a/panel-plugin/xkb-config.c +++ b/panel-plugin/xkb-config.c @@ -130,6 +130,54 @@ xkb_config_initialize (t_group_policy group_policy, return TRUE; } +static gchar * +xkb_config_xkb_description (XklConfigItem *config_item) +{ + gchar *ci_description; + gchar *description; + + ci_description = g_strstrip (config_item-description); + + if (ci_description[0] == 0) +description = g_strdup (config_item-name); + else +description = g_locale_to_utf8 (ci_description, -1, NULL, NULL, NULL); + + return description; +} + +static gchar* +xkb_config_create_pretty_layout_name (XklConfigRegistry *registry, + XklConfigItem *config_item, + gchar *layout_name, + gchar *layout_variant) +{ +gchar *pretty_layout_name; + +g_snprintf (config_item-name, sizeof (config_item-name), +%s, layout_variant); +if (xkl_config_registry_find_variant (registry, layout_name, config_item)) +{ +pretty_layout_name = xkb_config_xkb_description (config_item); +} +else +{ +g_snprintf (config_item-name, sizeof (config_item-name), +%s, layout_name); +if (xkl_config_registry_find_layout (registry, config_item)) +{ +pretty_layout_name = xkb_config_xkb_description (config_item); +} +else +{ +pretty_layout_name = xkb_util_get_layout_string (layout_name, + layout_variant); +} +} + +return pretty_layout_name; +} + static void xkb_config_initialize_xkb_options (const XklConfigRec *config_rec) { @@ -138,6 +186,8 @@ xkb_config_initialize_xkb_options (const XklConfigRec *config_rec) gint val, i; gpointer pval; gchar *imgfilename; +XklConfigRegistry *registry; +XklConfigItem *config_item; xkb_config_free (); @@ -156,6 +206,10 @@ xkb_config_initialize_xkb_options (const XklConfigRec *config_rec) config-variant_index_by_group = g_hash_table_new (NULL, NULL); index_variants = g_hash_table_new (g_str_hash, g_str_equal); +registry = xkl_config_registry_get_instance (config-engine); +xkl_config_registry_load (registry, FALSE); +config_item = xkl_config_item_new (); + for (i = 0; i config-group_count; i++) { t_group_data *group_data = config-group_data[i]; @@ -197,9 +251,12 @@ xkb_config_initialize_xkb_options (const XklConfigRec *config_rec) g_free (imgfilename); group_data-pretty_layout_name = -xkb_util_get_layout_string (group_data-group_name, -group_data-variant); +xkb_config_create_pretty_layout_name (registry, config_item, + group_data-group_name, + group_data-variant); } +g_object_unref (config_item); +g_object_unref (registry); g_hash_table_destroy (index_variants); } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Use configured text size when drawing text labels for missing flags.
Updating branch refs/heads/master to c627b1b55afd107c634fd8530c781fbea2603829 (commit) from 74a4232d6b4553d6517ac714223516763c8f6c4f (commit) commit c627b1b55afd107c634fd8530c781fbea2603829 Author: Igor Slepchin igor.slepc...@gmail.com Date: Wed Jul 25 23:14:59 2012 -0400 Use configured text size when drawing text labels for missing flags. panel-plugin/xkb-cairo.c |3 ++- panel-plugin/xkb-cairo.h |1 + panel-plugin/xkb-callbacks.c |1 + 3 files changed, 4 insertions(+), 1 deletions(-) diff --git a/panel-plugin/xkb-cairo.c b/panel-plugin/xkb-cairo.c index 3b828ec..86af836 100644 --- a/panel-plugin/xkb-cairo.c +++ b/panel-plugin/xkb-cairo.c @@ -55,6 +55,7 @@ xkb_cairo_draw_flag (cairo_t *cr, gint width, gint height, gint variant_markers_count, + gint textsize, GdkColor fgcolor) { gchar *filename; @@ -81,7 +82,7 @@ xkb_cairo_draw_flag (cairo_t *cr, actual_width, actual_height, width, height, variant_markers_count, -DISPLAY_TEXTSIZE_SMALL, // not used for flag layout +textsize, fgcolor); return; } diff --git a/panel-plugin/xkb-cairo.h b/panel-plugin/xkb-cairo.h index a8ecf32..e29d82b 100644 --- a/panel-plugin/xkb-cairo.h +++ b/panel-plugin/xkb-cairo.h @@ -42,6 +42,7 @@ voidxkb_cairo_draw_flag (cairo_t *cr, gint width, gint height, gint variant_markers_count, + gint textsize, GdkColor fgcolor); voidxkb_cairo_draw_label(cairo_t *cr, diff --git a/panel-plugin/xkb-callbacks.c b/panel-plugin/xkb-callbacks.c index 87fb638..ee7c056 100644 --- a/panel-plugin/xkb-callbacks.c +++ b/panel-plugin/xkb-callbacks.c @@ -124,6 +124,7 @@ xkb_plugin_layout_image_exposed (GtkWidget *widget, actual_hsize, actual_vsize, xkb-hsize, xkb-vsize, xkb_config_variant_index_for_group (-1), +xkb-display_textsize, fgcolor ); } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Add myself to authors list.
Updating branch refs/heads/master to 18afdce6c6e868426fd8f188478dabc23fb4cf46 (commit) from c627b1b55afd107c634fd8530c781fbea2603829 (commit) commit 18afdce6c6e868426fd8f188478dabc23fb4cf46 Author: Igor Slepchin igor.slepc...@gmail.com Date: Fri Jul 27 21:22:41 2012 -0400 Add myself to authors list. My 30sec of fame... AUTHORS|1 + panel-plugin/xkb-settings-dialog.c |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/AUTHORS b/AUTHORS index 57f793b..9706e65 100644 --- a/AUTHORS +++ b/AUTHORS @@ -2,3 +2,4 @@ Benedikt Meurer benedikt.meu...@unix-ag.uni-siegen.de Alexander Iliev sasoil...@mamul.org Gauvain Pocentek gauvainpocen...@gmail.com Azamat H. Hackimov azamat.hacki...@gmail.com +Igor Slepchin igor.slepc...@gmail.com \ No newline at end of file diff --git a/panel-plugin/xkb-settings-dialog.c b/panel-plugin/xkb-settings-dialog.c index afd0222..d155bdb 100644 --- a/panel-plugin/xkb-settings-dialog.c +++ b/panel-plugin/xkb-settings-dialog.c @@ -176,6 +176,7 @@ xfce_xkb_about (XfcePanelPlugin *plugin) const gchar* authors[] = { Alexander Iliev sasoil...@mamul.org, Gauvain Pocentek gauvainpocen...@gmail.com, +Igor Slepchin igor.slepc...@gmail.com, NULL }; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Remove .pot file.
Updating branch refs/heads/master to e395c0ab434b1dcfed39ae911adc3aa5d5a8b9d1 (commit) from b3116497bbc3d8078d50f1ef00e2efd7c8c85bd8 (commit) commit e395c0ab434b1dcfed39ae911adc3aa5d5a8b9d1 Author: Igor Slepchin igor.slepc...@gmail.com Date: Fri Jul 27 22:07:45 2012 -0400 Remove .pot file. .pot file is generated, there is no need to keep it in git. po/xfce4-xkb-plugin.pot | 89 --- 1 files changed, 0 insertions(+), 89 deletions(-) diff --git a/po/xfce4-xkb-plugin.pot b/po/xfce4-xkb-plugin.pot deleted file mode 100644 index eacae81..000 --- a/po/xfce4-xkb-plugin.pot +++ /dev/null @@ -1,89 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR EMAIL@ADDRESS, YEAR. -# -#, fuzzy -msgid -msgstr -Project-Id-Version: PACKAGE VERSION\n -Report-Msgid-Bugs-To: \n -POT-Creation-Date: 2012-07-27 22:05-0400\n -PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n -Last-Translator: FULL NAME EMAIL@ADDRESS\n -Language-Team: LANGUAGE l...@li.org\n -Language: \n -MIME-Version: 1.0\n -Content-Type: text/plain; charset=CHARSET\n -Content-Transfer-Encoding: 8bit\n - -#: ../panel-plugin/xkb-settings-dialog.c:112 -#: ../panel-plugin/xkb-plugin.desktop.in.in.h:1 -msgid Keyboard Layouts -msgstr - -#. *** -#: ../panel-plugin/xkb-settings-dialog.c:122 -msgid Show layout as: -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:127 -msgid image -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:128 -msgid text -msgstr - -#. text size option -#: ../panel-plugin/xkb-settings-dialog.c:133 -msgid Text size: -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:138 -msgid small -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:139 -msgid medium -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:140 -msgid large -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:144 -msgid Manage layout: -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:149 -msgid globally -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:150 -msgid per window -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:151 -msgid per application -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:185 -msgid Keyboard Layouts Plugin -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:195 -msgid Allows you to configure and use multiple keyboard layouts. -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:199 -msgid Other plugins available here -msgstr - -#: ../panel-plugin/xfce4-xkb-plugin.c:125 -msgid Keyboard settings -msgstr - -#: ../panel-plugin/xkb-plugin.desktop.in.in.h:2 -msgid Keyboard layouts setup and switch plugin -msgstr ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Stop drawing the layout label if normalized_group_name fails UTF8 validity check.
Updating branch refs/heads/master to 91940da28c9b4b7445cd058fd07a84e9ca0d58c8 (commit) from e395c0ab434b1dcfed39ae911adc3aa5d5a8b9d1 (commit) commit 91940da28c9b4b7445cd058fd07a84e9ca0d58c8 Author: Igor Slepchin igor.slepc...@gmail.com Date: Fri Jul 27 23:59:23 2012 -0400 Stop drawing the layout label if normalized_group_name fails UTF8 validity check. panel-plugin/xkb-cairo.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/panel-plugin/xkb-cairo.c b/panel-plugin/xkb-cairo.c index 86af836..8de3ec5 100644 --- a/panel-plugin/xkb-cairo.c +++ b/panel-plugin/xkb-cairo.c @@ -159,6 +159,7 @@ xkb_cairo_draw_label (cairo_t *cr, { g_object_unref (layout); g_free (normalized_group_name); +return; } pango_layout_set_text (layout, normalized_group_name, -1); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Add Kazakh flag (bug #9186).
Updating branch refs/heads/master to 886096b02e9f5ac415ba39c634fd7530124c7d96 (commit) from 91940da28c9b4b7445cd058fd07a84e9ca0d58c8 (commit) commit 886096b02e9f5ac415ba39c634fd7530124c7d96 Author: Igor Slepchin igor.slepc...@gmail.com Date: Wed Aug 22 17:32:38 2012 -0400 Add Kazakh flag (bug #9186). flags/Makefile.am |1 + flags/kz.svg | 121 + 2 files changed, 122 insertions(+), 0 deletions(-) diff --git a/flags/Makefile.am b/flags/Makefile.am index b48d931..d432851 100644 --- a/flags/Makefile.am +++ b/flags/Makefile.am @@ -48,6 +48,7 @@ flags_DATA = ae.svg \ kp.svg \ kr.svg \ kw.svg \ + kz.svg \ la.svg \ lb.svg \ lt.svg \ diff --git a/flags/kz.svg b/flags/kz.svg new file mode 100644 index 000..3f86704 --- /dev/null +++ b/flags/kz.svg @@ -0,0 +1,121 @@ +svg xmlns=http://www.w3.org/2000/svg; xmlns:xlink=http://www.w3.org/1999/xlink; width=600 height=300 viewBox=0 0 2000 1000 + +titleFlag of Kazakhstan/title + +defs + +path id=be d=M0-76.45c4-0.05,5.5-2.55,5.5-5.55,0-4-5.5-23.05-5.5-23.05s-5.5,19.05-5.5,23.05c0,3,1.5,5.55,5.5,5.55z/ + +path id=orn d=M-1,15c0-10,9-15.14,16.072-15.14,9.528,0,14.601,5.683,14.601,13.122,0,4.2169-0.77453,6.863-2.7237,10.899,0,0-15.717,32.606-21.836,45.217-0.76309,1.5729-1.0093,3.3634-1.0093,5.9885,0,4.0539,3.9416,7.3673,8.0744,7.4688,3.7675,0.094,7.8725-3.5039,7.8725-7.6033,0-4.9796-2.5894-7.1996-5.2483-7.1996-3.2718,0-4.5755,1.3418-4.5755,3.6335,0,1.5968,0.77308,2.2877,1.884,2.2877,2.8063,0,2.0186-3.768,2.0186-3.768,1.3938,0.3044,2.5388,1.725,1.884,3.4989,1.0196,0.22647,1.9747,0.7604,2.7251,1.6149-0.75228,0.72756-1.6152,1.2892-2.7251,1.4803,0.65722,2.1644-0.221,3.222-2.1195,3.6671,0.38311-0.8326,0.39629-1.5985,0.26914-2.3214-2.9889,0.84788-7.5697-0.5014-7.5697-5.652,0-5.1138,3.5576-9.4196,10.228-8.3435-1.5869-0.75687-2.394-2.3055-2.5569-4.0372,1.2112,0.471,2.5569,0.53829,2.5569,0.53829-0.77989-1.3719-1.8631-2.5544-1.8167-5.2483,1.2367,0.56086,2.3851,1.5994,3.9699,0.94201-2.4873-4.8826,0.56859-11.599,8.3435-13.188-2.8455,3.3273-4.239,6.9201-4.239,10.497,0,11.592,3.2297,13.5 4,3.2297,21.599,0,3.3717-1.7375,7.013-5.181,9.4874v-0.13457c2.276,0.608,3.734,1.726,4.572,3.245-5.2,1.471-12.759,1.444-16.818-0.149-4.6656-0.539-7.9221-4.11-8.8818-5.922-0.95972-1.811-2.8237-8.364,0-14.264,3.0903-6.457,17.661-37.277,22.204-46.966,0.9636-2.055,1.5476-4.2343,1.5476-6.5941,0-5.9349-5.4502-8.0071-8.5454-8.0071-3.7007,0-7.4688,2.8125-7.4688,6.3249,0,2.2256,1.2112,3.5662,2.9606,3.5662,4.1833,0,3.9292-3.55,3.0952-5.7866,2.6035,1.1676,4.1168,3.252,3.7007,5.4502,1.474,0.2014,2.877,0.89888,4.1717,2.355-1.0187,1.2832-2.2612,2.2532-4.1717,2.2877,0.83444,3.41-1.4543,4.8522-3.7007,5.652,0.71068-2.5027,1.1772-5.3829-3.0952-5.3829-3.115,0-5.5679-0.53829-6.9978-2.5569-0.084108,2.6914-0.33643,13.323-0.33643,13.323-0.17943,3.995,5.3605,3.8808,8.8818,2.6914-1.3289,4.6018-4.0543,7.0898-10.362,6.4595,1.5308,0.63922,3.1625,2.0762,3.1625,4.8446-0.001,3.746-3.0475,7.896-5.0475,9.123l-1-39z/ + +path id=uorn d=m0-35.599s4.7531-3.9844,6.3671-1.9859c2.5961,3.2144-7.982,19.225-7.982,24.863,0,9.255,6.1902,11.772,13.834,13.093,5.129,0.8871,13.481-0.371,13.481-0.371-1.5725-2.1079-2.5953-2.729-5.245-2.8975,2.9499-1.5278,5.9538-4.8441,5.9538-10.007,0-7.9617-3.2855-11.243-3.2855-20.219,0-4.9792,4.0929-11.318,4.0929-11.318-7.2343,0.72228-10.82,7.4047-8.7799,12.745-1.1516,0.16548-2.1972-0.09311-3.0952-0.94201-0.52945,1.4803,0.30635,3.1985,1.426,4.6788-0.90173,0.48068-1.564,0.19242-3-0.10332,0.13618,1.5252,1.0523,3.1455,3.2936,4.6706-6.5041-1.6845-10.506,2.8376-10.506,7.5715,0,3.5758,2.5119,6.1386,4.9671,6.1386,0.79347,0,1.959-0.326,2.6166-0.8156,0.46352,0.98414,0.22467,2.3013-0.25282,3.2855,1.7996-0.47454,2.9418-1.5407,2.1287-3.7599,1.3822-0.12667,2.4817-0.59257,3.2297-1.4803-0.75781-0.96814-1.9074-1.5258-3.2297-1.4803,1.0064-2.0718-0.11515-3.2317-1.7494-4.1718,0,0,1.0393,4.1717-1.6149,4.1717-1.1935,0-2.281-0.38758-2.281-2.1422,0-1.5279,1.339-3.6444,4.4341-3.5098,3.0952,0. 13457,5.6045,2.1289,5.6045,7.0577,0,4.5468-3.6762,6.8081-8.5205,6.9542-4.3688,0.13457-7.6662-2.2263-7.6662-6.7219,0-5.9835,8.6588-19.622,8.6588-24.954,0-4.0006-3.6064-6.2337-7.1351-6.2337-4.5755,0-8.4359,4.5197-8.4359,4.5197l2.688,3.362z/ + +/defs + +rect height=1000 width=2000 y=0 x=0 fill=#00afca/ + +use xlink:href=#use4303 transform=matrix(-1,0,0,1,240,0) height=1000 width=2000 y=0 x=0/ + +use xlink:href=#be transform=matrix(1.960637,0.3899949,-0.3899949,1.960637,1080.4716,420) height=500 width=1000 y=0 x=0 fill=#fec50c/ + +use xlink:href=#be transform=matrix(1.8468795,0.7650026,-0.7650026,1.8468795,1080.4716,420) height=500 width=1000 y=0 x=0 fill=#fec50c/ + +use xlink:href=#be transform=matrix(1.6621476,1.1106115,-1.1106115,1.6621476,1080.4716,420) height=500 width=1000 y=0 x=0 fill
[Xfce4-commits] xfce4-xkb-plugin:master Get rid of a redundant if (handle) check.
Updating branch refs/heads/master to 1474d4a846cc20781f99b7718e4b7372d47be55f (commit) from e8fe13e2f74cc462215cecca19271e0254df5b4d (commit) commit 1474d4a846cc20781f99b7718e4b7372d47be55f Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon Sep 10 17:50:09 2012 -0400 Get rid of a redundant if (handle) check. We did the same exact check a few lines earlier. panel-plugin/xkb-cairo.c | 45 - 1 files changed, 20 insertions(+), 25 deletions(-) diff --git a/panel-plugin/xkb-cairo.c b/panel-plugin/xkb-cairo.c index 8de3ec5..9c80444 100644 --- a/panel-plugin/xkb-cairo.c +++ b/panel-plugin/xkb-cairo.c @@ -92,39 +92,34 @@ xkb_cairo_draw_flag (cairo_t *cr, scalex = (double) (width - 4) / dim.width; scaley = (double) (height - 4) / dim.height; -if (handle) -{ -layoutx = (actual_width - width) / 2 + 2; -layouty = (actual_height - height) / 2 + 2; -cairo_translate (cr, layoutx, layouty); - -//cairo_translate (cr, 2, 2); +layoutx = (actual_width - width) / 2 + 2; +layouty = (actual_height - height) / 2 + 2; +cairo_translate (cr, layoutx, layouty); -cairo_save (cr); +cairo_save (cr); -cairo_scale (cr, scalex, scaley); -rsvg_handle_render_cairo (handle, cr); +cairo_scale (cr, scalex, scaley); +rsvg_handle_render_cairo (handle, cr); -cairo_restore (cr); +cairo_restore (cr); -/* draw variant_markers_count circles */ -for (i = 0; i variant_markers_count; i++) -{ -cairo_set_source_rgb (cr, 0, 0, 0); - -cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND); -cairo_set_line_width (cr, 1); +/* draw variant_markers_count circles */ +for (i = 0; i variant_markers_count; i++) +{ +cairo_set_source_rgb (cr, 0, 0, 0); -xkb_cairo_arc_for_flag (cr, -(7 * i) + 4, 4, 2.5, 0, 2 * G_PI); +cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND); +cairo_set_line_width (cr, 1); -cairo_set_source_rgb (cr, 0, 0, 0); -cairo_fill_preserve (cr); -cairo_set_source_rgb (cr, 1, 1, 1); -cairo_stroke (cr); -} +xkb_cairo_arc_for_flag (cr, -(7 * i) + 4, 4, 2.5, 0, 2 * G_PI); -g_object_unref (handle); +cairo_set_source_rgb (cr, 0, 0, 0); +cairo_fill_preserve (cr); +cairo_set_source_rgb (cr, 1, 1, 1); +cairo_stroke (cr); } + +g_object_unref (handle); } void ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Update the tooltip whenever the selected layout changes.
Updating branch refs/heads/master to 6a0acf5d78451e4c4648d99a1b7f4c0d52d78a66 (commit) from 1474d4a846cc20781f99b7718e4b7372d47be55f (commit) commit 6a0acf5d78451e4c4648d99a1b7f4c0d52d78a66 Author: Enrique cqu...@ovi.com Date: Tue Sep 18 13:34:58 2012 -0400 Update the tooltip whenever the selected layout changes. Bug 9286. panel-plugin/xfce4-xkb-plugin.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c index 598d68a..e9b1233 100644 --- a/panel-plugin/xfce4-xkb-plugin.c +++ b/panel-plugin/xfce4-xkb-plugin.c @@ -416,9 +416,17 @@ xkb_populate_popup_menu (t_xkb *xkb) void xkb_refresh_gui (t_xkb *xkb) { +GdkDisplay * display; + /* Part of the image may remain visible after display type change */ gtk_widget_queue_draw_area (xkb-btn, 0, 0, xkb-button_hsize, xkb-button_vsize); + +display = gdk_display_get_default(); +if (display) +{ +gtk_tooltip_trigger_tooltip_query(display); +} } static void ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Remove .pot file
Updating branch refs/heads/4.10_panel_support to 1bec152160f5f1241c2b60938a58617121e124d5 (commit) from 19ca46d4e7d905f99ef3182afc0679d8c06fdde2 (commit) commit 1bec152160f5f1241c2b60938a58617121e124d5 Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon May 13 17:47:52 2013 -0400 Remove .pot file .pot file is generated, there is no need to keep it in git. po/xfce4-xkb-plugin.pot | 128 --- 1 files changed, 0 insertions(+), 128 deletions(-) diff --git a/po/xfce4-xkb-plugin.pot b/po/xfce4-xkb-plugin.pot deleted file mode 100644 index 2900c3f..000 --- a/po/xfce4-xkb-plugin.pot +++ /dev/null @@ -1,128 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR EMAIL@ADDRESS, YEAR. -# -#, fuzzy -msgid -msgstr -Project-Id-Version: PACKAGE VERSION\n -Report-Msgid-Bugs-To: \n -POT-Creation-Date: 2011-11-04 21:50+0600\n -PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n -Last-Translator: FULL NAME EMAIL@ADDRESS\n -Language-Team: LANGUAGE l...@li.org\n -Language: \n -MIME-Version: 1.0\n -Content-Type: text/plain; charset=CHARSET\n -Content-Transfer-Encoding: 8bit\n - -#: ../panel-plugin/xkb-settings-dialog.c:489 -msgid -XKB configuration modifications are\n -disabled from the config file.\n -\n -See the README file for more information. -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:515 -#: ../panel-plugin/xkb-plugin.desktop.in.in.h:1 -msgid Keyboard Layouts -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:537 -msgid Keyboard model: -msgstr - -#. toggle layout option -#: ../panel-plugin/xkb-settings-dialog.c:562 -msgid Change layout option: -msgstr - -#. compose key position option -#: ../panel-plugin/xkb-settings-dialog.c:588 -msgid Compose key position: -msgstr - -#. the actual layouts -#: ../panel-plugin/xkb-settings-dialog.c:615 -msgid Keyboard layouts: -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:628 -msgid Default -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:635 -msgid Layout -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:643 -msgid Variant -msgstr - -#. *** -#: ../panel-plugin/xkb-settings-dialog.c:687 -msgid Show layout as: -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:692 -msgid image -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:693 -msgid text -msgstr - -#. text size option -#: ../panel-plugin/xkb-settings-dialog.c:698 -msgid Text size: -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:703 -msgid small -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:704 -msgid medium -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:705 -msgid large -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:709 -msgid Manage layout: -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:714 -msgid globally -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:715 -msgid per window -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:716 -msgid per application -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:758 -msgid Keyboard Layouts Plugin -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:764 -msgid Allows you to configure and use multiple keyboard layouts. -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:768 -msgid Other plugins available here -msgstr - -#: ../panel-plugin/xkb-settings-dialog.c:820 -msgid Add layout -msgstr - -#: ../panel-plugin/xkb-plugin.desktop.in.in.h:2 -msgid Keyboard layouts setup and switch plugin -msgstr ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Updates for release.
Updating branch refs/heads/4.10_panel_support to fefdad37d481d3668f38cd2c89fbfb31fa0dcd7c (commit) from 1bec152160f5f1241c2b60938a58617121e124d5 (commit) commit fefdad37d481d3668f38cd2c89fbfb31fa0dcd7c Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon May 13 17:45:50 2013 -0400 Updates for release. NEWS|9 + configure.in.in |6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index d7b5e93..d2c3d49 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,12 @@ +2013-05-13 16:36 +* New version 0.5.5 +* Several crashes fixed +* Text labels are scaled to the size of text area +* Kazakh flag added +* Panel 4.10 compatibility +* Reset xkb config when new keyboard is detected + (configs should no longer be lost, or at least not as often as before) + 2012-01-07 04:18 winterheart * New version 0.5.4.3 * Fix error with incorrect handling variants (bug #8255 by Ivan Romanov) diff --git a/configure.in.in b/configure.in.in index 6d48040..a4b184d 100644 --- a/configure.in.in +++ b/configure.in.in @@ -12,10 +12,10 @@ dnl *** Version information *** dnl *** m4_define([xkb_version_major], [0]) m4_define([xkb_version_minor], [5]) -m4_define([xkb_version_micro], [4]) -m4_define([xkb_version_nano], [3]) +m4_define([xkb_version_micro], [5]) +m4_define([xkb_version_nano], []) m4_define([xkb_version_build], [@REVISION@]) -m4_define([xkb_version_tag], [git]) +m4_define([xkb_version_tag], []) m4_define([xkb_version], [xkb_version_major().xkb_version_minor().xkb_version_micro()ifelse(xkb_version_nano(), [], [], [.xkb_version_nano()])ifelse(xkb_version_tag(), [git], [xkb_version_tag()-xkb_version_build()], [xkb_version_tag()])]) dnl *** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin|0.5.5 Creating annotated tag 0.5.5
Updating annotated tag refs/tags/0.5.5 as new annotated tag to 82bd514ee558b227e84e9f196046d3e253eb15a4 (tag) succeeds 0.5.4.3-66-g1bec152 tagged by Igor Slepchin igor.slepc...@gmail.com on 2013-05-14 00:35 +0200 Igor Slepchin (1): Updates for release. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Post release tag bump.
Updating branch refs/heads/4.10_panel_support to 810b85c067f3b876951cca2335658d72363de43b (commit) from fefdad37d481d3668f38cd2c89fbfb31fa0dcd7c (commit) commit 810b85c067f3b876951cca2335658d72363de43b Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon May 13 19:02:17 2013 -0400 Post release tag bump. configure.in.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure.in.in b/configure.in.in index a4b184d..9840430 100644 --- a/configure.in.in +++ b/configure.in.in @@ -15,7 +15,7 @@ m4_define([xkb_version_minor], [5]) m4_define([xkb_version_micro], [5]) m4_define([xkb_version_nano], []) m4_define([xkb_version_build], [@REVISION@]) -m4_define([xkb_version_tag], []) +m4_define([xkb_version_tag], [git]) m4_define([xkb_version], [xkb_version_major().xkb_version_minor().xkb_version_micro()ifelse(xkb_version_nano(), [], [], [.xkb_version_nano()])ifelse(xkb_version_tag(), [git], [xkb_version_tag()-xkb_version_build()], [xkb_version_tag()])]) dnl *** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Updates for release.
Updating branch refs/heads/master to 70a4ae9170312a7853cc0251ac074276062156fd (commit) from 9540c8e1238538bf3f841e8605273aa341252680 (commit) commit 70a4ae9170312a7853cc0251ac074276062156fd Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon May 20 17:54:30 2013 -0400 Updates for release. NEWS| 19 +++ configure.in.in |8 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index d7b5e93..2c672a3 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,22 @@ +2013-05-20 17:29 +* New version 0.7.0 - to be used with xfce4-settings 4.11 or later; + do *not* use this version with XFCE 4.8 or 4.10, it won't work! +* This is a fairly major rework - keyboard layouts are now configured + through xfce4-keyboard-settings and managed by xfsettingsd; + xkb-plugin only manages per window/application layout prefs + and just acts as a layout indicator otherwise +* Many crashes/leaks fixed +* More descriptive layout/variant names in tooltips/popup menus +* xfce 4.10 panel compatibility +* Text labels are scaled to the size of text area +* Kazakh flag added +* Panel 4.10 compatibility +* Layout configs should no longer be lost (this is really handled + by the code moved to xfce4-settings though) +* XKB settings not managed by XFCE should no longer be overwritten + (again, this is really handled by xfce4-settings now) +* New dependency on garcon (used to launch xfce4-keyboard-settings) + 2012-01-07 04:18 winterheart * New version 0.5.4.3 * Fix error with incorrect handling variants (bug #8255 by Ivan Romanov) diff --git a/configure.in.in b/configure.in.in index 9ea867e..0db4147 100644 --- a/configure.in.in +++ b/configure.in.in @@ -11,11 +11,11 @@ dnl *** dnl *** Version information *** dnl *** m4_define([xkb_version_major], [0]) -m4_define([xkb_version_minor], [5]) -m4_define([xkb_version_micro], [4]) -m4_define([xkb_version_nano], [3]) +m4_define([xkb_version_minor], [7]) +m4_define([xkb_version_micro], [0]) +m4_define([xkb_version_nano], []) m4_define([xkb_version_build], [@REVISION@]) -m4_define([xkb_version_tag], [git]) +m4_define([xkb_version_tag], []) m4_define([xkb_version], [xkb_version_major().xkb_version_minor().xkb_version_micro()ifelse(xkb_version_nano(), [], [], [.xkb_version_nano()])ifelse(xkb_version_tag(), [git], [xkb_version_tag()-xkb_version_build()], [xkb_version_tag()])]) dnl *** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin|0.7.0 Creating annotated tag 0.7.0
Updating annotated tag refs/tags/0.7.0 as new annotated tag to 5b5492cd940ea60879e89d8ee31f38f4f85daa86 (tag) succeeds 0.5.4.3-72-g9540c8e tagged by Igor Slepchin igor.slepc...@gmail.com on 2013-05-20 23:59 +0200 Igor Slepchin (1): Updates for release. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Post release tag bump.
Updating branch refs/heads/master to 0359b41328aa64373a64d4d8ebab556cbd50652d (commit) from 70a4ae9170312a7853cc0251ac074276062156fd (commit) commit 0359b41328aa64373a64d4d8ebab556cbd50652d Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon May 20 18:14:07 2013 -0400 Post release tag bump. configure.in.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure.in.in b/configure.in.in index 0db4147..dd59f97 100644 --- a/configure.in.in +++ b/configure.in.in @@ -15,7 +15,7 @@ m4_define([xkb_version_minor], [7]) m4_define([xkb_version_micro], [0]) m4_define([xkb_version_nano], []) m4_define([xkb_version_build], [@REVISION@]) -m4_define([xkb_version_tag], []) +m4_define([xkb_version_tag], [git]) m4_define([xkb_version], [xkb_version_major().xkb_version_minor().xkb_version_micro()ifelse(xkb_version_nano(), [], [], [.xkb_version_nano()])ifelse(xkb_version_tag(), [git], [xkb_version_tag()-xkb_version_build()], [xkb_version_tag()])]) dnl *** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Fix compiler warning
Updating branch refs/heads/4.10_panel_support to a9e10fe8455da12ff73c787d3a7d758cddc86b48 (commit) from 27b5107145e181c9f68b9ea807a9414e3882d135 (commit) commit a9e10fe8455da12ff73c787d3a7d758cddc86b48 Author: Igor Slepchin igor.slepc...@gmail.com Date: Thu Jun 6 17:03:28 2013 -0400 Fix compiler warning panel-plugin/xkb-settings-dialog.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/panel-plugin/xkb-settings-dialog.c b/panel-plugin/xkb-settings-dialog.c index 9d9ea5c..85216ac 100644 --- a/panel-plugin/xkb-settings-dialog.c +++ b/panel-plugin/xkb-settings-dialog.c @@ -738,7 +738,7 @@ xfce_xkb_configure (XfcePanelPlugin *plugin, g_signal_connect (xkb-add_layout_btn, clicked, G_CALLBACK (xkb_settings_add_layout), xkb); g_signal_connect (xkb-rm_layout_btn, clicked, G_CALLBACK (xkb_settings_rm_layout), xkb); g_signal_connect (xkb-edit_layout_btn, clicked, G_CALLBACK (xkb_settings_edit_layout), xkb); -selection = gtk_tree_view_get_selection (xkb-layout_tree_view); +selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (xkb-layout_tree_view)); g_signal_connect (selection, changed, G_CALLBACK (xkb_settings_edit_layout_btn_show), xkb); g_signal_connect (renderer2, toggled, G_CALLBACK (xkb_settings_default_layout_toggled), xkb); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Don't do anything fancy on panel's save signal
Updating branch refs/heads/4.10_panel_support to c68e88ca7419a2010e0574f731555dc6652a8acf (commit) from a9e10fe8455da12ff73c787d3a7d758cddc86b48 (commit) commit c68e88ca7419a2010e0574f731555dc6652a8acf Author: Igor Slepchin igor.slepc...@gmail.com Date: Fri Jun 7 16:38:19 2013 -0400 Don't do anything fancy on panel's save signal I.e., just save the current config, don't re-activate/reset XKB settings. This should take care of bug 10152. panel-plugin/xfce4-xkb-plugin.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c index 037102b..914b61e 100644 --- a/panel-plugin/xfce4-xkb-plugin.c +++ b/panel-plugin/xfce4-xkb-plugin.c @@ -252,8 +252,7 @@ xfce_xkb_save_config (XfcePanelPlugin *plugin, t_xkb *xkb) gchar* filename; XfceRc* rcfile; -xkb_config_update_settings (xkb-settings); -xkb_initialize_menu (xkb); +TRACE ( ); filename = xfce_panel_plugin_save_location (plugin, TRUE); if (!filename) @@ -400,6 +399,8 @@ xkb_initialize_menu (t_xkb *xkb) GtkWidget *image; GtkWidget *menu_item; +TRACE ( ); + if (G_UNLIKELY (xkb == NULL)) return; if (xkb-popup) ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Edit layout only if a layout is selected
Updating branch refs/heads/4.10_panel_support to 849db74acb904dee78268237be730959dbc90990 (commit) from 810b85c067f3b876951cca2335658d72363de43b (commit) commit 849db74acb904dee78268237be730959dbc90990 Author: Igor Slepchin igor.slepc...@gmail.com Date: Thu May 23 17:53:58 2013 -0400 Edit layout only if a layout is selected panel-plugin/xkb-settings-dialog.c | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/panel-plugin/xkb-settings-dialog.c b/panel-plugin/xkb-settings-dialog.c index 2f9f8f3..c1ae085 100644 --- a/panel-plugin/xkb-settings-dialog.c +++ b/panel-plugin/xkb-settings-dialog.c @@ -380,14 +380,16 @@ xkb_settings_edit_layout (GtkWidget *widget, t_xkb *xkb) selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (xkb-layout_tree_view)); strings = g_strsplit_set(c, ,, 0); -gtk_tree_selection_get_selected (selection, model, iter); -gtk_tree_model_get (model, iter, DEFAULT_LAYOUT, is_default, -1); -gtk_list_store_set (xkb-layout_store, iter, -DEFAULT_LAYOUT, is_default, -LAYOUTS, strings[0], -VARIANTS, strings[1], --1); -xkb_settings_update_from_ui (xkb); +if (gtk_tree_selection_get_selected (selection, model, iter)) +{ +gtk_tree_model_get (model, iter, DEFAULT_LAYOUT, is_default, -1); +gtk_list_store_set (xkb-layout_store, iter, +DEFAULT_LAYOUT, is_default, +LAYOUTS, strings[0], +VARIANTS, strings[1], +-1); +xkb_settings_update_from_ui (xkb); +} g_strfreev (strings); } g_free(c); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Disable Edit layout button if no layout is selected
Updating branch refs/heads/4.10_panel_support to 27b5107145e181c9f68b9ea807a9414e3882d135 (commit) from 849db74acb904dee78268237be730959dbc90990 (commit) commit 27b5107145e181c9f68b9ea807a9414e3882d135 Author: Igor Slepchin igor.slepc...@gmail.com Date: Thu May 23 17:55:15 2013 -0400 Disable Edit layout button if no layout is selected We need to pay attention to treeview's selection, not cursor. panel-plugin/xkb-settings-dialog.c | 16 ++-- 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/panel-plugin/xkb-settings-dialog.c b/panel-plugin/xkb-settings-dialog.c index c1ae085..9d9ea5c 100644 --- a/panel-plugin/xkb-settings-dialog.c +++ b/panel-plugin/xkb-settings-dialog.c @@ -353,12 +353,14 @@ static void xkb_settings_edit_layout_btn_show (GtkTreeView *tree_view, t_xkb *xkb) { -GtkTreePath *p; -GtkTreeViewColumn *c; -gtk_tree_view_get_cursor (GTK_TREE_VIEW (tree_view), p, c); +GtkTreeSelection *selection; +gboolean selected; + +selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (xkb-layout_tree_view)); +selected = gtk_tree_selection_get_selected (selection, NULL, NULL); + gtk_widget_set_sensitive (xkb-edit_layout_btn, -(p != NULL !xkb-settings-never_modify_config)); -gtk_tree_path_free (p); + selected !xkb-settings-never_modify_config); } static void @@ -508,6 +510,7 @@ xfce_xkb_configure (XfcePanelPlugin *plugin, GtkCellRenderer *renderer, *renderer2; GtkWidget *vbox1, *vbox2, *hbox, *frame; XklConfigRegistry *registry; +GtkTreeSelection *selection; xfce_panel_plugin_block_menu (plugin); @@ -735,7 +738,8 @@ xfce_xkb_configure (XfcePanelPlugin *plugin, g_signal_connect (xkb-add_layout_btn, clicked, G_CALLBACK (xkb_settings_add_layout), xkb); g_signal_connect (xkb-rm_layout_btn, clicked, G_CALLBACK (xkb_settings_rm_layout), xkb); g_signal_connect (xkb-edit_layout_btn, clicked, G_CALLBACK (xkb_settings_edit_layout), xkb); -g_signal_connect (xkb-layout_tree_view, cursor-changed, G_CALLBACK (xkb_settings_edit_layout_btn_show), xkb); +selection = gtk_tree_view_get_selection (xkb-layout_tree_view); +g_signal_connect (selection, changed, G_CALLBACK (xkb_settings_edit_layout_btn_show), xkb); g_signal_connect (renderer2, toggled, G_CALLBACK (xkb_settings_default_layout_toggled), xkb); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Check that current group number is sensible
Updating branch refs/heads/4.10_panel_support to 5efe92e830c77fbe97fea6c11e50827599b3f43a (commit) from c68e88ca7419a2010e0574f731555dc6652a8acf (commit) commit 5efe92e830c77fbe97fea6c11e50827599b3f43a Author: Igor Slepchin igor.slepc...@gmail.com Date: Fri Jun 7 17:33:32 2013 -0400 Check that current group number is sensible xklavier seems to return an invalid group number occasionally; there isn't much we can do if xklavier lies to us but we can at least try not to crash. See bug 10128 and https://bugs.freedesktop.org/show_bug.cgi?id=65352. panel-plugin/xkb-config.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c index 2871d96..27fe3ab 100644 --- a/panel-plugin/xkb-config.c +++ b/panel-plugin/xkb-config.c @@ -260,7 +260,12 @@ static gint xkb_config_get_current_group (void) { XklState* state = xkl_engine_get_current_state (config-engine); -return state-group; +g_assert(state-group = 0 state-group config-group_count); + +if (G_LIKELY (state-group = 0 state-group config-group_count)) +return state-group; +else +return 0; } gboolean ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Fix crash in xkb_util_normalize_group_name
Updating branch refs/heads/4.10_panel_support to 9995998bcf8b07e2ad5c15eb6500f40b970daed5 (commit) from 5efe92e830c77fbe97fea6c11e50827599b3f43a (commit) commit 9995998bcf8b07e2ad5c15eb6500f40b970daed5 Author: Igor Slepchin igor.slepc...@gmail.com Date: Fri Jun 7 17:50:11 2013 -0400 Fix crash in xkb_util_normalize_group_name Correctly compute offset of the first separator char in group name. panel-plugin/xkb-util.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/panel-plugin/xkb-util.c b/panel-plugin/xkb-util.c index 324928f..1e64cfc 100644 --- a/panel-plugin/xkb-util.c +++ b/panel-plugin/xkb-util.c @@ -81,7 +81,7 @@ xkb_util_normalize_group_name (const gchar* group_name) { if (!((*c = 'a' *c = 'z') || (*c = 'A' *c = 'Z'))) { -index_of_na = group_name - c; +index_of_na = c - group_name; break; } } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Window title to reflect if layout is added/edited
Updating branch refs/heads/4.10_panel_support to c9f0046632ba3fe04f33f5e915db1d7d6a5b8640 (commit) from 7064d0473144a5eac3c8939893e93e1fe16bb77c (commit) commit c9f0046632ba3fe04f33f5e915db1d7d6a5b8640 Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon Jun 17 14:37:03 2013 -0400 Window title to reflect if layout is added/edited Bug 10180 panel-plugin/xkb-settings-dialog.c | 17 - 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/panel-plugin/xkb-settings-dialog.c b/panel-plugin/xkb-settings-dialog.c index 85216ac..3c86f83 100644 --- a/panel-plugin/xkb-settings-dialog.c +++ b/panel-plugin/xkb-settings-dialog.c @@ -64,7 +64,13 @@ enum enumeration NUM }; -static gchar *xkb_settings_layout_dialog_run (); +enum change_layout +{ +ADD_LAYOUT, +EDIT_LAYOUT +}; + +static gchar *xkb_settings_layout_dialog_run (enum change_layout action); static void xkb_settings_update_from_ui(t_xkb *xkb); /**/ @@ -372,7 +378,7 @@ xkb_settings_edit_layout (GtkWidget *widget, t_xkb *xkb) model = gtk_tree_view_get_model (GTK_TREE_VIEW (xkb-layout_tree_view)); -c = xkb_settings_layout_dialog_run (); +c = xkb_settings_layout_dialog_run (EDIT_LAYOUT); if (c != NULL) { GtkTreeSelection *selection; @@ -402,7 +408,7 @@ static void xkb_settings_add_layout (GtkWidget *widget, t_xkb *xkb) { gchar *c; -c = xkb_settings_layout_dialog_run(); +c = xkb_settings_layout_dialog_run (ADD_LAYOUT); if (c != NULL) { GtkTreeIter iter; @@ -814,7 +820,7 @@ xkb_settings_add_layout_to_available_layouts_tree (XklConfigRegistry * config_re } static gchar * -xkb_settings_layout_dialog_run (void) +xkb_settings_layout_dialog_run (enum change_layout action) { GtkWidget *dialog; GtkTreeStore *treestore; @@ -827,7 +833,8 @@ xkb_settings_layout_dialog_run (void) registry = xkb_config_get_xkl_registry (); -dialog = xfce_titled_dialog_new_with_buttons(_(Add layout), +dialog = xfce_titled_dialog_new_with_buttons (action == ADD_LAYOUT ? _(Add layout) : + _(Edit layout), GTK_WINDOW (settings_dialog), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Output XKB options in XKB_DEBUG_CONFIG_REC macro
Updating branch refs/heads/4.10_panel_support to 969fa33973c2ea1812e3d20ad131adbd1fb9cd54 (commit) from b8343318f38e305efdf408e2b81563ae36169f48 (commit) commit 969fa33973c2ea1812e3d20ad131adbd1fb9cd54 Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon Jun 17 17:33:49 2013 -0400 Output XKB options in XKB_DEBUG_CONFIG_REC macro panel-plugin/xkb-config.h |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/panel-plugin/xkb-config.h b/panel-plugin/xkb-config.h index 6c702be..2ec3a3f 100644 --- a/panel-plugin/xkb-config.h +++ b/panel-plugin/xkb-config.h @@ -112,15 +112,19 @@ gint xkb_config_get_max_layout_number (void); if (crec) { \ gchar *layouts = g_strjoinv (,, crec-layouts); \ gchar *variants = g_strjoinv (,, crec-variants); \ +gchar *options = g_strjoinv (,, crec-options); \ g_printf (\n\ model: %s [%p]\n\ layouts: %s [%p]\n\ -variants: %s [%p]\n, \ +variants: %s [%p]\n,\ +options: %s [%p]\n, \ crec-model, crec-model, \ layouts, crec-layouts, \ -variants, crec-variants); \ +variants, crec-variants, \ +options, crec-options); \ g_free (layouts); \ g_free (variants); \ +g_free (options); \ } else { \ g_printf (NULL\n); \ } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Don't overwrite XKB options we don't control
Updating branch refs/heads/4.10_panel_support to 74218e0ede839f0b4fde84991126540d275d0e5f (commit) from 969fa33973c2ea1812e3d20ad131adbd1fb9cd54 (commit) commit 74218e0ede839f0b4fde84991126540d275d0e5f Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon Jun 17 17:52:35 2013 -0400 Don't overwrite XKB options we don't control Bug 6370 (also mention in bug 10091). This is largely copied over from the code that lives in xfce4-settings in the current git master. panel-plugin/xkb-config.c | 139 - 1 files changed, 99 insertions(+), 40 deletions(-) diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c index f2ceda1..045d1d5 100644 --- a/panel-plugin/xkb-config.c +++ b/panel-plugin/xkb-config.c @@ -86,6 +86,14 @@ static void xkb_config_free (); static void xkb_config_initialize_xkb_options (t_xkb_settings *settings); static gboolean xkb_config_activate_xkl_record (); +static gchar* xkb_config_xkl_get_option (gchar **options, + const gchar *option_name, + gchar **other_options); +static void xkb_config_xkl_set_option (const gchar *xkb_option_name, + const gchar *xfconf_option_name); + + + /* -- implementation - */ gboolean @@ -308,9 +316,6 @@ gboolean xkb_config_update_settings (t_xkb_settings *settings) { gboolean activate_settings = FALSE; - -gchar **opt; -gchar **prefix; int i; g_assert (config != NULL); @@ -325,6 +330,7 @@ xkb_config_update_settings (t_xkb_settings *settings) if (settings-kbd_config == NULL || settings-never_modify_config) { +/* Update plugin's settings from XKL */ xkl_config_rec_reset (config-config_rec); if (!xkl_config_rec_get_from_server (config-config_rec, config-engine)) { @@ -356,8 +362,6 @@ xkb_config_update_settings (t_xkb_settings *settings) } else { -gchar *options; - activate_settings = TRUE; g_free (config-config_rec-model); @@ -369,46 +373,19 @@ xkb_config_update_settings (t_xkb_settings *settings) g_strfreev (config-config_rec-variants); config-config_rec-variants = g_strsplit_set (settings-kbd_config-variants, ,, 0); -if (settings-kbd_config-toggle_option - strlen (settings-kbd_config-toggle_option) 0) -options = g_strdup (settings-kbd_config-toggle_option); -else options = g_strdup (); - -if (settings-kbd_config-compose_key_position - strlen (settings-kbd_config-compose_key_position) 0) -{ -gchar *tmp = options; -options = g_strconcat (tmp, ,, settings-kbd_config-compose_key_position, NULL); -g_free (tmp); -} - -g_strfreev (config-config_rec-options); -config-config_rec-options = g_strsplit_set (options, ,, 0); -g_free (options); +xkb_config_xkl_set_option (grp:, settings-kbd_config-toggle_option); +xkb_config_xkl_set_option (compose:, settings-kbd_config-compose_key_position); } /* select the first grp option and use it (should be fixed to support more options) */ g_free (settings-kbd_config-toggle_option); -settings-kbd_config-toggle_option = NULL; g_free (settings-kbd_config-compose_key_position); -settings-kbd_config-compose_key_position = NULL; -opt = config-config_rec-options; -while (opt *opt) -{ -prefix = g_strsplit(*opt, :, 2); -if (settings-kbd_config-toggle_option == NULL - prefix *prefix strcmp(*prefix, grp) == 0) -{ -settings-kbd_config-toggle_option = g_strdup (*opt); -} -else if (prefix *prefix strcmp(*prefix, compose) == 0) -{ -settings-kbd_config-compose_key_position = g_strdup (*opt); -} - -g_strfreev (prefix); -opt++; -} +settings-kbd_config-toggle_option = +g_strdup (xkb_config_xkl_get_option (config-config_rec-options, + grp:, NULL)); +settings-kbd_config-compose_key_position = +g_strdup (xkb_config_xkl_get_option (config-config_rec-options, + compose:, NULL)); if (activate_settings !settings-never_modify_config) { @@ -690,3 +667,85 @@ xkb_config_activate_xkl_record (void) return rc; } + +/** + * @options - Xkl config options (array of strings terminated in NULL) + * @option_name the name of the xkb option to look for (e.g., grp:) + * @_other_options if not NULL, will be set to the input option string + * excluding @option_name. Needs to be freed
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Update Russian translation
Updating branch refs/heads/4.10_panel_support to b8343318f38e305efdf408e2b81563ae36169f48 (commit) from 7db7754dff26a8216fbf76b6668bcfcc997e0518 (commit) commit b8343318f38e305efdf408e2b81563ae36169f48 Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon Jun 17 18:23:18 2013 -0400 Update Russian translation po/ru.po |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/po/ru.po b/po/ru.po index 7b599a5..1a42a0e 100644 --- a/po/ru.po +++ b/po/ru.po @@ -129,9 +129,8 @@ msgid Add layout msgstr Добавить раскладку #: ../panel-plugin/xkb-settings-dialog.c:837 -#, fuzzy msgid Edit layout -msgstr Добавить раскладку +msgstr Изменить раскладку #: ../panel-plugin/xkb-plugin.desktop.in.in.h:2 msgid Keyboard layouts setup and switch plugin ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Replace g_assert with g_warning. Bug 10128.
Updating branch refs/heads/4.10_panel_support to 7064d0473144a5eac3c8939893e93e1fe16bb77c (commit) from f26301839e73061b97f18830af75eefc66b25646 (commit) commit 7064d0473144a5eac3c8939893e93e1fe16bb77c Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon Jun 17 14:16:59 2013 -0400 Replace g_assert with g_warning. Bug 10128. panel-plugin/xkb-config.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c index 27fe3ab..f2ceda1 100644 --- a/panel-plugin/xkb-config.c +++ b/panel-plugin/xkb-config.c @@ -260,12 +260,15 @@ static gint xkb_config_get_current_group (void) { XklState* state = xkl_engine_get_current_state (config-engine); -g_assert(state-group = 0 state-group config-group_count); if (G_LIKELY (state-group = 0 state-group config-group_count)) return state-group; else +{ +g_warning (Invalid group number: %d; group_count=%d, + state-group, config-group_count); return 0; +} } gboolean ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Code style fixes
Updating branch refs/heads/4.10_panel_support to 87848f49da72aa7a100f055edeb186f2b9f64895 (commit) from 74218e0ede839f0b4fde84991126540d275d0e5f (commit) commit 87848f49da72aa7a100f055edeb186f2b9f64895 Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon Jun 17 17:55:34 2013 -0400 Code style fixes panel-plugin/xfce4-xkb-plugin.c|4 ++-- panel-plugin/xkb-config.c |4 ++-- panel-plugin/xkb-settings-dialog.c | 28 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c index 914b61e..16e1443 100644 --- a/panel-plugin/xfce4-xkb-plugin.c +++ b/panel-plugin/xfce4-xkb-plugin.c @@ -460,10 +460,10 @@ xkb_refresh_gui (t_xkb *xkb) gtk_widget_queue_draw_area (xkb-btn, 0, 0, xkb-button_hsize, xkb-button_vsize); -display = gdk_display_get_default(); +display = gdk_display_get_default (); if (display) { -gtk_tooltip_trigger_tooltip_query(display); +gtk_tooltip_trigger_tooltip_query (display); } } diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c index 045d1d5..16046f0 100644 --- a/panel-plugin/xkb-config.c +++ b/panel-plugin/xkb-config.c @@ -334,7 +334,7 @@ xkb_config_update_settings (t_xkb_settings *settings) xkl_config_rec_reset (config-config_rec); if (!xkl_config_rec_get_from_server (config-config_rec, config-engine)) { -DBG (ERROR: can't get xkl config: [%s], xkl_get_last_error()); +DBG (ERROR: can't get xkl config: [%s], xkl_get_last_error ()); } /* XklConfigRec uses for NULL for empty variant instead of . @@ -662,7 +662,7 @@ xkb_config_activate_xkl_record (void) if (!rc) { -DBG (ERROR: can't activate xkl config: [%s], xkl_get_last_error()); +DBG (ERROR: can't activate xkl config: [%s], xkl_get_last_error ()); } return rc; diff --git a/panel-plugin/xkb-settings-dialog.c b/panel-plugin/xkb-settings-dialog.c index 3c86f83..70a5912 100644 --- a/panel-plugin/xkb-settings-dialog.c +++ b/panel-plugin/xkb-settings-dialog.c @@ -112,7 +112,7 @@ static char * xci_desc_to_utf8 (XklConfigItem * ci) { char *sd = g_strstrip (ci-description); -return sd[0] == 0 ? g_strdup (ci-name) : g_strdup(sd); +return sd[0] == 0 ? g_strdup (ci-name) : g_strdup (sd); } /**/ @@ -236,7 +236,7 @@ xkb_settings_set_toggle_option_combo_default_value (t_xkb *xkb) } else { -while (gtk_tree_model_iter_next(model, iter)) +while (gtk_tree_model_iter_next (model, iter)) { g_free (id); gtk_tree_model_get (model, iter, NOM, id, -1); @@ -313,7 +313,7 @@ xkb_settings_set_kbd_combo_default_value (t_xkb *xkb) gtk_combo_box_set_active_iter (GTK_COMBO_BOX (xkb-kbd_model_combo), iter); else { -while (gtk_tree_model_iter_next(model, iter)) +while (gtk_tree_model_iter_next (model, iter)) { g_free (id); gtk_tree_model_get (model, iter, NOM, id, -1); @@ -386,7 +386,7 @@ xkb_settings_edit_layout (GtkWidget *widget, t_xkb *xkb) gchar **strings; selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (xkb-layout_tree_view)); -strings = g_strsplit_set(c, ,, 0); +strings = g_strsplit_set (c, ,, 0); if (gtk_tree_selection_get_selected (selection, model, iter)) { @@ -400,7 +400,7 @@ xkb_settings_edit_layout (GtkWidget *widget, t_xkb *xkb) } g_strfreev (strings); } -g_free(c); +g_free (c); xkb_settings_edit_layout_btn_show (GTK_TREE_VIEW (xkb-layout_tree_view), xkb); } @@ -414,7 +414,7 @@ xkb_settings_add_layout (GtkWidget *widget, t_xkb *xkb) GtkTreeIter iter; gchar **strings; -strings = g_strsplit_set(c, ,, 0); +strings = g_strsplit_set (c, ,, 0); gtk_list_store_append (xkb-layout_store, iter); gtk_list_store_set (xkb-layout_store, iter, DEFAULT_LAYOUT, FALSE, @@ -845,7 +845,7 @@ xkb_settings_layout_dialog_run (enum change_layout action) gtk_window_set_icon_name (GTK_WINDOW (dialog), xfce4-keyboard); -treestore = gtk_tree_store_new(2, G_TYPE_STRING, G_TYPE_STRING); +treestore = gtk_tree_store_new (2, G_TYPE_STRING, G_TYPE_STRING); xkl_config_registry_foreach_layout (registry, (ConfigItemProcessFunc) xkb_settings_add_layout_to_available_layouts_tree, treestore); @@ -875,7 +875,7 @@ xkb_settings_layout_dialog_run (enum change_layout action) gtk_container_add (GTK_CONTAINER (scrolledw), tree_view); gtk_widget_show (GTK_WIDGET (tree_view)); -gtk_window_set_default_size(GTK_WINDOW (dialog), 400, 400); +gtk_window_set_default_size (GTK_WINDOW (dialog), 400, 400); gtk_widget_show (dialog); response = gtk_dialog_run (GTK_DIALOG (dialog
[Xfce4-commits] xfce4-xkb-plugin|0.5.6 Creating annotated tag 0.5.6
Updating annotated tag refs/tags/0.5.6 as new annotated tag to 2c02ba1ef62d6f49fc6770aa58926d607591b34c (tag) succeeds 0.5.5-15-g87848f4 tagged by Igor Slepchin igor.slepc...@gmail.com on 2013-06-19 22:46 +0200 Igor Slepchin (1): Updates for release. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Updates for release.
Updating branch refs/heads/4.10_panel_support to 6e16b9052a4d7723877fbc55c4ac1a3532bd4e38 (commit) from 87848f49da72aa7a100f055edeb186f2b9f64895 (commit) commit 6e16b9052a4d7723877fbc55c4ac1a3532bd4e38 Author: Igor Slepchin igor.slepc...@gmail.com Date: Wed Jun 19 16:31:29 2013 -0400 Updates for release. NEWS| 12 configure.in.in |4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index d2c3d49..3c542b3 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,15 @@ +2013-06-19 16:30 +* New version 0.5.6 +* Don't do anything fancy on panel's save signal + (bug 10152, aka xkb plugin changes layout randomly) +* Check that current group number is sensible (bug 10128) +* Fix crash in xkb_util_normalize_group_name (bug 10156) +* Window title reflects if layout is added/edited (bug 10180) +* Don't overwrite XKB options we don't control (bug 6370) +* Disable Edit layout button if no layout is selected +* Fix compiler warning +* Use nicer looking flag dimensions in tooltips + 2013-05-13 16:36 * New version 0.5.5 * Several crashes fixed diff --git a/configure.in.in b/configure.in.in index 9840430..b14f5ac 100644 --- a/configure.in.in +++ b/configure.in.in @@ -12,10 +12,10 @@ dnl *** Version information *** dnl *** m4_define([xkb_version_major], [0]) m4_define([xkb_version_minor], [5]) -m4_define([xkb_version_micro], [5]) +m4_define([xkb_version_micro], [6]) m4_define([xkb_version_nano], []) m4_define([xkb_version_build], [@REVISION@]) -m4_define([xkb_version_tag], [git]) +m4_define([xkb_version_tag], []) m4_define([xkb_version], [xkb_version_major().xkb_version_minor().xkb_version_micro()ifelse(xkb_version_nano(), [], [], [.xkb_version_nano()])ifelse(xkb_version_tag(), [git], [xkb_version_tag()-xkb_version_build()], [xkb_version_tag()])]) dnl *** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Post release tag bump
Updating branch refs/heads/4.10_panel_support to 0b4ef33161a58f39fb3c1ee1a84847d1a60a95af (commit) from 6e16b9052a4d7723877fbc55c4ac1a3532bd4e38 (commit) commit 0b4ef33161a58f39fb3c1ee1a84847d1a60a95af Author: Igor Slepchin igor.slepc...@gmail.com Date: Wed Jun 19 16:56:45 2013 -0400 Post release tag bump configure.in.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure.in.in b/configure.in.in index b14f5ac..3fd7d06 100644 --- a/configure.in.in +++ b/configure.in.in @@ -15,7 +15,7 @@ m4_define([xkb_version_minor], [5]) m4_define([xkb_version_micro], [6]) m4_define([xkb_version_nano], []) m4_define([xkb_version_build], [@REVISION@]) -m4_define([xkb_version_tag], []) +m4_define([xkb_version_tag], [git]) m4_define([xkb_version], [xkb_version_major().xkb_version_minor().xkb_version_micro()ifelse(xkb_version_nano(), [], [], [.xkb_version_nano()])ifelse(xkb_version_tag(), [git], [xkb_version_tag()-xkb_version_build()], [xkb_version_tag()])]) dnl *** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Fix crash in xkb_util_normalize_group_name
Updating branch refs/heads/master to afc0c84257d33e712b06cc3e5de7b0fe63480ebd (commit) from 215e99df0124d4045f97f2f4b2aa637d77b811a1 (commit) commit afc0c84257d33e712b06cc3e5de7b0fe63480ebd Author: Igor Slepchin igor.slepc...@gmail.com Date: Fri Jun 7 17:50:11 2013 -0400 Fix crash in xkb_util_normalize_group_name Correctly compute offset of the first separator char in group name. (cherry picked from commit 9995998bcf8b07e2ad5c15eb6500f40b970daed5) panel-plugin/xkb-util.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/panel-plugin/xkb-util.c b/panel-plugin/xkb-util.c index 324928f..1e64cfc 100644 --- a/panel-plugin/xkb-util.c +++ b/panel-plugin/xkb-util.c @@ -81,7 +81,7 @@ xkb_util_normalize_group_name (const gchar* group_name) { if (!((*c = 'a' *c = 'z') || (*c = 'A' *c = 'Z'))) { -index_of_na = group_name - c; +index_of_na = c - group_name; break; } } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:xfce-git-master Creating branch xfce-git-master
Updating branch refs/heads/xfce-git-master as new branch to 12bcc6ad143800e36a62ef181b297937bb0bde1e (commit) Branches are created implicitly by pushing. This mail only exists to let you know that there was code pushed to refs/heads/xfce-git-master for the first time. Mails for the commits that lead to the creation of the branch will follow after this mail. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:xfce-git-master Fix rsvg #include warning
Updating branch refs/heads/xfce-git-master to 9a4599dfe96247d0b3095aeec085b7c8e669545a (commit) from 9559c16330791bf01d2091fd1664ecfd4ab58120 (commit) commit 9a4599dfe96247d0b3095aeec085b7c8e669545a Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon Mar 11 17:43:10 2013 -0400 Fix rsvg #include warning Including rsvg headers other than rsvg.h produces a warning; see commit 3b8adaa7e780b85695306292dfb23107d219bb34 in librsvg. panel-plugin/xkb-cairo.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/panel-plugin/xkb-cairo.h b/panel-plugin/xkb-cairo.h index e29d82b..13b790a 100644 --- a/panel-plugin/xkb-cairo.h +++ b/panel-plugin/xkb-cairo.h @@ -31,7 +31,6 @@ #include gdk/gdk.h #include cairo/cairo.h #include librsvg/rsvg.h -#include librsvg/rsvg-cairo.h #include pango/pangocairo.h voidxkb_cairo_draw_flag (cairo_t *cr, ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:xfce-git-master Scale layout label text to the size of the button
Updating branch refs/heads/xfce-git-master to e0fe4255033fab3615006ca23358bfbb7dba1604 (commit) from b8861cade0f00d2443358a43af8826b170673175 (commit) commit e0fe4255033fab3615006ca23358bfbb7dba1604 Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Mar 19 17:29:54 2013 -0400 Scale layout label text to the size of the button large text size will scale to the max size that fits into the button; medium size is 0.7 of that size; small is 0.475 of the max. The default text label size is now large. panel-plugin/xfce4-xkb-plugin.c |4 +- panel-plugin/xkb-cairo.c| 102 +-- panel-plugin/xkb-cairo.h| 16 +++--- 3 files changed, 55 insertions(+), 67 deletions(-) diff --git a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c index a485ea5..87770a9 100644 --- a/panel-plugin/xfce4-xkb-plugin.c +++ b/panel-plugin/xfce4-xkb-plugin.c @@ -303,7 +303,7 @@ xkb_load_config (t_xkb *xkb, const gchar *filename) xfce_rc_set_group (rcfile, NULL); xkb-display_type = xfce_rc_read_int_entry (rcfile, display_type, DISPLAY_TYPE_IMAGE); -xkb-display_textsize = xfce_rc_read_int_entry (rcfile, display_textsize, DISPLAY_TEXTSIZE_SMALL); +xkb-display_textsize = xfce_rc_read_int_entry (rcfile, display_textsize, DISPLAY_TEXTSIZE_LARGE); xkb-group_policy = xfce_rc_read_int_entry (rcfile, group_policy, GROUP_POLICY_PER_APPLICATION); xfce_rc_close (rcfile); @@ -318,7 +318,7 @@ static void xkb_load_default (t_xkb *xkb) { xkb-display_type = DISPLAY_TYPE_IMAGE; -xkb-display_textsize = DISPLAY_TEXTSIZE_SMALL; +xkb-display_textsize = DISPLAY_TEXTSIZE_LARGE; xkb-group_policy = GROUP_POLICY_PER_APPLICATION; } diff --git a/panel-plugin/xkb-cairo.c b/panel-plugin/xkb-cairo.c index ff1f5e9..af598a7 100644 --- a/panel-plugin/xkb-cairo.c +++ b/panel-plugin/xkb-cairo.c @@ -27,7 +27,7 @@ #include xkb-util.h #include xfce4-xkb-plugin.h -#define XKB_PREFERRED_FONT Courier New, Courier 10 Pitch, Monospace Bold %dpx +#define XKB_PREFERRED_FONT Courier New, Courier 10 Pitch, Monospace Bold #define xkb_cairo_arc_for_flag(cr, x, y, r, a1, a2) \ xx = layoutx + width - 12 + x; \ @@ -126,29 +126,31 @@ xkb_cairo_draw_flag (cairo_t *cr, void xkb_cairo_draw_label (cairo_t *cr, const gchar *group_name, - gint panel_size, - gint actual_width, - gint actual_height, - gint width, - gint height, - gint variant_markers_count, - gint textsize, - GdkColor fgcolor) + const gint panel_size, + const gint actual_width, + const gint actual_height, + const gint width, + const gint height, + const gint variant_markers_count, + const gint textsize, + const GdkColor fgcolor) { gchar *normalized_group_name; -/* gchar font_str[80]; */ gint pango_width, pango_height; -double layoutx, layouty; +double layoutx, layouty, text_width, text_height; double xx, yy; double scalex, scaley; gint i; -double radius; +double radius, diameter; PangoLayout *layout; PangoFontDescription *desc; g_assert (cr != NULL); +DBG (actual width/height: %d/%d; markers: %d, + actual_width, actual_height, variant_markers_count); + layout = pango_cairo_create_layout (cr); normalized_group_name = xkb_util_normalize_group_name (group_name); @@ -161,63 +163,53 @@ xkb_cairo_draw_label (cairo_t *cr, } pango_layout_set_text (layout, normalized_group_name, -1); -/* switch (textsize){ */ -/* case DISPLAY_TEXTSIZE_SMALL: */ -/* default:/\* catch misconfiguration *\/ */ -/* g_sprintf (font_str, XKB_PREFERRED_FONT, (int)(0.475 * panel_size) ); */ -/* break; */ -/* case DISPLAY_TEXTSIZE_MEDIUM: */ -/* g_sprintf (font_str, XKB_PREFERRED_FONT, (int)(0.700 * panel_size) ); */ -/* break; */ -/* case DISPLAY_TEXTSIZE_LARGE: */ -/* g_sprintf (font_str, XKB_PREFERRED_FONT, (int)(1.000 * panel_size) ); */ -/* break; */ -/* } */ - -/* DBG (font: %s, font_str); */ - -//desc = pango_font_description_from_string (font_str); -desc = pango_font_description_from_string( Courier New, Courier 10 Pitch, Monospace Bold ); + +desc = pango_font_description_from_string ( XKB_PREFERRED_FONT ); pango_layout_set_font_description (layout, desc); pango_font_description_free (desc); gdk_cairo_set_source_color (cr, fgcolor); pango_layout_get_pixel_size (layout, pango_width, pango_height); - -/* layoutx = (int) (actual_width
[Xfce4-commits] xfce4-xkb-plugin:xfce-git-master Compatibility with 4.10 panel
Updating branch refs/heads/xfce-git-master to b8861cade0f00d2443358a43af8826b170673175 (commit) from 9a4599dfe96247d0b3095aeec085b7c8e669545a (commit) commit b8861cade0f00d2443358a43af8826b170673175 Author: Igor Slepchin igor.slepc...@gmail.com Date: Fri Mar 15 17:29:23 2013 -0400 Compatibility with 4.10 panel The xkb plugin now always occupies one row only (xfce_panel_plugin_set_small). If the panel has only one row, the plugin requests a rectangular shape (just as it used to); with more than one panel row, the plugin will be the standard square so as to better blend in with other plugins at the expense of having smaller display area. Bug 8762 panel-plugin/xfce4-xkb-plugin.c | 29 +- panel-plugin/xkb-cairo.c| 80 ++ panel-plugin/xkb-callbacks.c| 25 +--- 3 files changed, 109 insertions(+), 25 deletions(-) diff --git a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c index e9b1233..a485ea5 100644 --- a/panel-plugin/xfce4-xkb-plugin.c +++ b/panel-plugin/xfce4-xkb-plugin.c @@ -101,6 +101,8 @@ xfce_xkb_construct (XfcePanelPlugin *plugin) xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, UTF-8); +xfce_panel_plugin_set_small (plugin, TRUE); + g_signal_connect (plugin, orientation-changed, G_CALLBACK (xfce_xkb_orientation_changed), xkb); @@ -210,6 +212,7 @@ xkb_new (XfcePanelPlugin *plugin) gtk_button_set_relief (GTK_BUTTON (xkb-btn), GTK_RELIEF_NONE); gtk_container_add (GTK_CONTAINER (xkb-plugin), xkb-btn); xfce_panel_plugin_add_action_widget (xkb-plugin, xkb-btn); +xkb-button_state = GTK_STATE_NORMAL; gtk_widget_show (xkb-btn); g_signal_connect (xkb-btn, clicked, G_CALLBACK (xkb_plugin_button_clicked), xkb); @@ -322,17 +325,37 @@ xkb_load_default (t_xkb *xkb) static gboolean xkb_calculate_sizes (t_xkb *xkb, GtkOrientation orientation, gint panel_size) { +guint nrows; + +nrows = xfce_panel_plugin_get_nrows (xkb-plugin); +panel_size /= nrows; +TRACE (calculate_sizes(%p: %d,%d), xkb, panel_size, nrows); switch (orientation) { case GTK_ORIENTATION_HORIZONTAL: xkb-vsize = panel_size; -xkb-hsize = (int) (1.33 * panel_size); +if (nrows 1) +{ +xkb-hsize = xkb-vsize; +} +else +{ +xkb-hsize = (int) (1.33 * panel_size); +} + gtk_widget_set_size_request (xkb-btn, xkb-hsize, xkb-vsize); break; case GTK_ORIENTATION_VERTICAL: xkb-hsize = panel_size; -xkb-vsize = (int) (0.75 * panel_size); +if (nrows 1) +{ +xkb-vsize = xkb-hsize; +} +else +{ +xkb-vsize = (int) (0.75 * panel_size); +} if (xkb-vsize 10) xkb-vsize = 10; gtk_widget_set_size_request (xkb-btn, xkb-hsize, xkb-vsize); break; @@ -340,6 +363,8 @@ xkb_calculate_sizes (t_xkb *xkb, GtkOrientation orientation, gint panel_size) break; } +DBG (size requested: h/v (%p: %d/%d), xkb, xkb-hsize, xkb-vsize); + xkb_refresh_gui (xkb); return TRUE; } diff --git a/panel-plugin/xkb-cairo.c b/panel-plugin/xkb-cairo.c index 9c80444..ff1f5e9 100644 --- a/panel-plugin/xkb-cairo.c +++ b/panel-plugin/xkb-cairo.c @@ -27,7 +27,7 @@ #include xkb-util.h #include xfce4-xkb-plugin.h -#define XKB_PREFERRED_FONT Courier New, Courier 10 Pitch, Monospace Bold %d +#define XKB_PREFERRED_FONT Courier New, Courier 10 Pitch, Monospace Bold %dpx #define xkb_cairo_arc_for_flag(cr, x, y, r, a1, a2) \ xx = layoutx + width - 12 + x; \ @@ -119,6 +119,7 @@ xkb_cairo_draw_flag (cairo_t *cr, cairo_stroke (cr); } +rsvg_handle_close (handle, NULL); g_object_unref (handle); } @@ -135,12 +136,13 @@ xkb_cairo_draw_label (cairo_t *cr, GdkColor fgcolor) { gchar *normalized_group_name; -gchar font_str[80]; +/* gchar font_str[80]; */ gint pango_width, pango_height; -gint layoutx, layouty; +double layoutx, layouty; double xx, yy; +double scalex, scaley; gint i; -gint radius; +double radius; PangoLayout *layout; PangoFontDescription *desc; @@ -150,7 +152,8 @@ xkb_cairo_draw_label (cairo_t *cr, layout = pango_cairo_create_layout (cr); normalized_group_name = xkb_util_normalize_group_name (group_name); -if (!g_utf8_validate (normalized_group_name, -1, NULL)) +if (!normalized_group_name || +!g_utf8_validate (normalized_group_name, -1, NULL)) { g_object_unref (layout); g_free (normalized_group_name); @@ -158,39 +161,82 @@ xkb_cairo_draw_label (cairo_t *cr, } pango_layout_set_text (layout, normalized_group_name, -1
[Xfce4-commits] xfce4-xkb-plugin:xfce-git-master disable static libs by default when initing libtool
Updating branch refs/heads/xfce-git-master to 63cda4061481d5c957006256d989ce2ec734bc0c (commit) from c696d20687631bb3300cf9cfa6bd58bc2c27f59e (commit) commit 63cda4061481d5c957006256d989ce2ec734bc0c Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Mar 19 20:48:09 2013 -0400 disable static libs by default when initing libtool Bug 6920 configure.in.in |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/configure.in.in b/configure.in.in index 35d88e9..4da9f84 100644 --- a/configure.in.in +++ b/configure.in.in @@ -39,8 +39,9 @@ dnl AC_PROG_CC() AC_PROG_LD() AC_PROG_INSTALL() -AC_PROG_LIBTOOL() AC_PROG_INTLTOOL() +LT_PREREQ([2.2.6]) +LT_INIT([disable-static]) dnl *** dnl *** Check for UNIX variants *** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:xfce-git-master Remove generated files from git
Updating branch refs/heads/xfce-git-master to c696d20687631bb3300cf9cfa6bd58bc2c27f59e (commit) from e0fe4255033fab3615006ca23358bfbb7dba1604 (commit) commit c696d20687631bb3300cf9cfa6bd58bc2c27f59e Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Mar 19 19:24:53 2013 -0400 Remove generated files from git INSTALL | 365 depcomp | 630 --- 2 files changed, 0 insertions(+), 995 deletions(-) diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 7d1c323..000 --- a/INSTALL +++ /dev/null @@ -1,365 +0,0 @@ -Installation Instructions -* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008, 2009 Free Software Foundation, Inc. - - Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. This file is offered as-is, -without warranty of any kind. - -Basic Installation -== - - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following -more-detailed instructions are generic; see the `README' file for -instructions specific to this package. Some packages provide this -`INSTALL' file but do not implement all of the features documented -below. The lack of an optional feature in a given package is not -necessarily a bug. More recommendations for GNU packages can be found -in *note Makefile Conventions: (standards)Makefile Conventions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. Caching is -disabled by default to prevent problems with accidental use of stale -cache files. - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You need `configure.ac' if -you want to change it or regenerate `configure' using a newer version -of `autoconf'. - - The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. - - Running `configure' might take a while. While running, it prints - some messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package, generally using the just-built uninstalled binaries. - - 4. Type `make install' to install the programs and any data files and - documentation. When installing into a prefix owned by root, it is - recommended that the package be configured and built as a regular - user, and only the `make install' phase executed with root - privileges. - - 5. Optionally, type `make installcheck' to repeat any self-tests, but - this time using the binaries in their final installed location. - This target does not install anything. Running this target as a - regular user, particularly if the prior `make install' required - root privileges, verifies that the installation completed - correctly. - - 6. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - - 7. Often, you can also type `make uninstall' to remove the installed - files again. In practice, not all packages have tested that - uninstallation works correctly, even though
[Xfce4-commits] xfce4-xkb-plugin:xfce-git-master Get rid of a few warnings in configure.in.in
Updating branch refs/heads/xfce-git-master to 451e5b94f88e33767afcac9c071ffe22b0ec226c (commit) from 63cda4061481d5c957006256d989ce2ec734bc0c (commit) commit 451e5b94f88e33767afcac9c071ffe22b0ec226c Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Mar 19 20:51:29 2013 -0400 Get rid of a few warnings in configure.in.in Running autogen.sh/configure will no longer warn about needing AC_USE_SYSTEM_EXTENSIONS and AM_PROG_CC_C_O. configure.in.in | 20 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/configure.in.in b/configure.in.in index 4da9f84..ff769d3 100644 --- a/configure.in.in +++ b/configure.in.in @@ -19,7 +19,7 @@ m4_define([xkb_version], [xkb_version_major().xkb_version_minor().xkb_version_mi dnl *** dnl *** Initialize autoconf *** dnl *** -AC_COPYRIGHT([Copyright (c) 2006-2012 +AC_COPYRIGHT([Copyright (c) 2006-2013 The Xfce development team. All rights reserved.]) AC_INIT([xfce4-xkb-plugin], [xkb_version], [http://bugzilla.xfce.org/], [xfce4-xkb-plugin]) AC_PREREQ([2.50]) @@ -33,6 +33,14 @@ AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar]) AM_CONFIG_HEADER([config.h]) AM_MAINTAINER_MODE() +dnl *** +dnl *** Check for UNIX variants *** +dnl *** +AC_AIX() +AC_ISC_POSIX() +AC_MINIX() +AM_CONDITIONAL([HAVE_CYGWIN], [test `uname | grep \CYGWIN\` != ]) + dnl dnl *** Check for basic programs *** dnl @@ -42,14 +50,10 @@ AC_PROG_INSTALL() AC_PROG_INTLTOOL() LT_PREREQ([2.2.6]) LT_INIT([disable-static]) +AM_PROG_CC_C_O() -dnl *** -dnl *** Check for UNIX variants *** -dnl *** -AC_AIX() -AC_ISC_POSIX() -AC_MINIX() -AM_CONDITIONAL([HAVE_CYGWIN], [test `uname | grep \CYGWIN\` != ]) +dnl Check for standard header files +AC_HEADER_STDC dnl * dnl *** Check for X11 *** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:xfce-git-master Print debug configuration after running configure
Updating branch refs/heads/xfce-git-master to 8584df77c2346abf2b89246af826c8a17f413e69 (commit) from 451e5b94f88e33767afcac9c071ffe22b0ec226c (commit) commit 8584df77c2346abf2b89246af826c8a17f413e69 Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Mar 19 20:55:06 2013 -0400 Print debug configuration after running configure Also, delete some unused and commented out lines. configure.in.in | 22 +- 1 files changed, 9 insertions(+), 13 deletions(-) diff --git a/configure.in.in b/configure.in.in index ff769d3..723c5a7 100644 --- a/configure.in.in +++ b/configure.in.in @@ -76,19 +76,6 @@ XDT_CHECK_PACKAGE([LIBXKLAVIER], [libxklavier], [5.0]) XDT_CHECK_PACKAGE([LIBRSVG], [librsvg-2.0], [2.18]) XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-1.0], [2.12]) -dnl AC_ARG_ENABLE([debug], -dnlAC_HELP_STRING([--enable-plugin-debug], -dnl[Enable debug messages output (default=disabled)]), -dnl[ac_cv_enable_dummy_scripts=$enableval], -dnl[ac_cv_enable_dummy_scripts=no]) -dnl if test x$ac_cv_enable_dummy_scripts = xno; then -dnlXKB_DEBUG= -dnl else -dnlXKB_DEBUG=-DXKB_DEBUG -dnl fi -dnl AC_SUBST(XKB_DEBUG) - - dnl *** dnl *** Check for debugging support *** dnl *** @@ -100,3 +87,12 @@ flags/Makefile Makefile po/Makefile.in ]) + +dnl *** +dnl *** Print configuration *** +dnl *** +echo +echo Build Configuration: +echo +echo * Debug Support:$enable_debug +echo ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:xfce-git-master Remove duplicate automake options
Updating branch refs/heads/xfce-git-master to 30e92d49efea3fc6085bde1a1dcb36097177f554 (commit) from 8584df77c2346abf2b89246af826c8a17f413e69 (commit) commit 30e92d49efea3fc6085bde1a1dcb36097177f554 Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Mar 19 20:56:00 2013 -0400 Remove duplicate automake options We already set them with AM_INIT_AUTOMAKE in configure.in.in Makefile.am |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 231adb2..e3c220b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,10 +2,6 @@ SUBDIRS = panel-plugin flags po -AUTOMAKE_OPTIONS = \ - 1.8 \ - dist-bzip2 - distclean-local: rm -rf *.cache *~ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:xfce-git-master Include git revision in dev build numbers
Updating branch refs/heads/xfce-git-master to f5528f22a936946e65218ddbc13c4834eb42df8d (commit) from 30e92d49efea3fc6085bde1a1dcb36097177f554 (commit) commit f5528f22a936946e65218ddbc13c4834eb42df8d Author: Igor Slepchin igor.slepc...@gmail.com Date: Wed Mar 20 10:59:47 2013 -0400 Include git revision in dev build numbers configure.in.in |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/configure.in.in b/configure.in.in index 723c5a7..97f3612 100644 --- a/configure.in.in +++ b/configure.in.in @@ -14,7 +14,9 @@ m4_define([xkb_version_major], [0]) m4_define([xkb_version_minor], [5]) m4_define([xkb_version_micro], [4]) m4_define([xkb_version_nano], [3]) -m4_define([xkb_version], [xkb_version_major().xkb_version_minor().xkb_version_micro()ifelse(xkb_version_nano(), [], [], .[xkb_version_nano()])]) +m4_define([xkb_version_build], [@REVISION@]) +m4_define([xkb_version_tag], [git]) +m4_define([xkb_version], [xkb_version_major().xkb_version_minor().xkb_version_micro()ifelse(xkb_version_nano(), [], [], [.xkb_version_nano()])ifelse(xkb_version_tag(), [git], [xkb_version_tag()-xkb_version_build()], [xkb_version_tag()])]) dnl *** dnl *** Initialize autoconf *** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:xfce-git-master Use nicer looking flag dimensions in tooltips
Updating branch refs/heads/xfce-git-master to 12bcc6ad143800e36a62ef181b297937bb0bde1e (commit) from f5528f22a936946e65218ddbc13c4834eb42df8d (commit) commit 12bcc6ad143800e36a62ef181b297937bb0bde1e Author: Igor Slepchin igor.slepc...@gmail.com Date: Wed Mar 20 12:50:25 2013 -0400 Use nicer looking flag dimensions in tooltips panel-plugin/xkb-config.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c index 3967131..70fc426 100644 --- a/panel-plugin/xkb-config.c +++ b/panel-plugin/xkb-config.c @@ -243,7 +243,7 @@ xkb_config_initialize_xkb_options (const XklConfigRec *config_rec) { GdkPixbuf *tmp = rsvg_handle_get_pixbuf (handle); group_data-tooltip_pixbuf = -gdk_pixbuf_scale_simple (tmp, 24, 24, GDK_INTERP_BILINEAR); +gdk_pixbuf_scale_simple (tmp, 30, 22, GDK_INTERP_BILINEAR); g_object_unref (tmp); rsvg_handle_close (handle, NULL); g_object_unref (handle); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Fix rsvg #include warning
Updating branch refs/heads/master to 9a4599dfe96247d0b3095aeec085b7c8e669545a (commit) from 9559c16330791bf01d2091fd1664ecfd4ab58120 (commit) commit 9a4599dfe96247d0b3095aeec085b7c8e669545a Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon Mar 11 17:43:10 2013 -0400 Fix rsvg #include warning Including rsvg headers other than rsvg.h produces a warning; see commit 3b8adaa7e780b85695306292dfb23107d219bb34 in librsvg. panel-plugin/xkb-cairo.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/panel-plugin/xkb-cairo.h b/panel-plugin/xkb-cairo.h index e29d82b..13b790a 100644 --- a/panel-plugin/xkb-cairo.h +++ b/panel-plugin/xkb-cairo.h @@ -31,7 +31,6 @@ #include gdk/gdk.h #include cairo/cairo.h #include librsvg/rsvg.h -#include librsvg/rsvg-cairo.h #include pango/pangocairo.h voidxkb_cairo_draw_flag (cairo_t *cr, ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Compatibility with 4.10 panel
Updating branch refs/heads/master to b8861cade0f00d2443358a43af8826b170673175 (commit) from 9a4599dfe96247d0b3095aeec085b7c8e669545a (commit) commit b8861cade0f00d2443358a43af8826b170673175 Author: Igor Slepchin igor.slepc...@gmail.com Date: Fri Mar 15 17:29:23 2013 -0400 Compatibility with 4.10 panel The xkb plugin now always occupies one row only (xfce_panel_plugin_set_small). If the panel has only one row, the plugin requests a rectangular shape (just as it used to); with more than one panel row, the plugin will be the standard square so as to better blend in with other plugins at the expense of having smaller display area. Bug 8762 panel-plugin/xfce4-xkb-plugin.c | 29 +- panel-plugin/xkb-cairo.c| 80 ++ panel-plugin/xkb-callbacks.c| 25 +--- 3 files changed, 109 insertions(+), 25 deletions(-) diff --git a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c index e9b1233..a485ea5 100644 --- a/panel-plugin/xfce4-xkb-plugin.c +++ b/panel-plugin/xfce4-xkb-plugin.c @@ -101,6 +101,8 @@ xfce_xkb_construct (XfcePanelPlugin *plugin) xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, UTF-8); +xfce_panel_plugin_set_small (plugin, TRUE); + g_signal_connect (plugin, orientation-changed, G_CALLBACK (xfce_xkb_orientation_changed), xkb); @@ -210,6 +212,7 @@ xkb_new (XfcePanelPlugin *plugin) gtk_button_set_relief (GTK_BUTTON (xkb-btn), GTK_RELIEF_NONE); gtk_container_add (GTK_CONTAINER (xkb-plugin), xkb-btn); xfce_panel_plugin_add_action_widget (xkb-plugin, xkb-btn); +xkb-button_state = GTK_STATE_NORMAL; gtk_widget_show (xkb-btn); g_signal_connect (xkb-btn, clicked, G_CALLBACK (xkb_plugin_button_clicked), xkb); @@ -322,17 +325,37 @@ xkb_load_default (t_xkb *xkb) static gboolean xkb_calculate_sizes (t_xkb *xkb, GtkOrientation orientation, gint panel_size) { +guint nrows; + +nrows = xfce_panel_plugin_get_nrows (xkb-plugin); +panel_size /= nrows; +TRACE (calculate_sizes(%p: %d,%d), xkb, panel_size, nrows); switch (orientation) { case GTK_ORIENTATION_HORIZONTAL: xkb-vsize = panel_size; -xkb-hsize = (int) (1.33 * panel_size); +if (nrows 1) +{ +xkb-hsize = xkb-vsize; +} +else +{ +xkb-hsize = (int) (1.33 * panel_size); +} + gtk_widget_set_size_request (xkb-btn, xkb-hsize, xkb-vsize); break; case GTK_ORIENTATION_VERTICAL: xkb-hsize = panel_size; -xkb-vsize = (int) (0.75 * panel_size); +if (nrows 1) +{ +xkb-vsize = xkb-hsize; +} +else +{ +xkb-vsize = (int) (0.75 * panel_size); +} if (xkb-vsize 10) xkb-vsize = 10; gtk_widget_set_size_request (xkb-btn, xkb-hsize, xkb-vsize); break; @@ -340,6 +363,8 @@ xkb_calculate_sizes (t_xkb *xkb, GtkOrientation orientation, gint panel_size) break; } +DBG (size requested: h/v (%p: %d/%d), xkb, xkb-hsize, xkb-vsize); + xkb_refresh_gui (xkb); return TRUE; } diff --git a/panel-plugin/xkb-cairo.c b/panel-plugin/xkb-cairo.c index 9c80444..ff1f5e9 100644 --- a/panel-plugin/xkb-cairo.c +++ b/panel-plugin/xkb-cairo.c @@ -27,7 +27,7 @@ #include xkb-util.h #include xfce4-xkb-plugin.h -#define XKB_PREFERRED_FONT Courier New, Courier 10 Pitch, Monospace Bold %d +#define XKB_PREFERRED_FONT Courier New, Courier 10 Pitch, Monospace Bold %dpx #define xkb_cairo_arc_for_flag(cr, x, y, r, a1, a2) \ xx = layoutx + width - 12 + x; \ @@ -119,6 +119,7 @@ xkb_cairo_draw_flag (cairo_t *cr, cairo_stroke (cr); } +rsvg_handle_close (handle, NULL); g_object_unref (handle); } @@ -135,12 +136,13 @@ xkb_cairo_draw_label (cairo_t *cr, GdkColor fgcolor) { gchar *normalized_group_name; -gchar font_str[80]; +/* gchar font_str[80]; */ gint pango_width, pango_height; -gint layoutx, layouty; +double layoutx, layouty; double xx, yy; +double scalex, scaley; gint i; -gint radius; +double radius; PangoLayout *layout; PangoFontDescription *desc; @@ -150,7 +152,8 @@ xkb_cairo_draw_label (cairo_t *cr, layout = pango_cairo_create_layout (cr); normalized_group_name = xkb_util_normalize_group_name (group_name); -if (!g_utf8_validate (normalized_group_name, -1, NULL)) +if (!normalized_group_name || +!g_utf8_validate (normalized_group_name, -1, NULL)) { g_object_unref (layout); g_free (normalized_group_name); @@ -158,39 +161,82 @@ xkb_cairo_draw_label (cairo_t *cr, } pango_layout_set_text (layout, normalized_group_name, -1
[Xfce4-commits] xfce4-xkb-plugin:master Scale layout label text to the size of the button
Updating branch refs/heads/master to e0fe4255033fab3615006ca23358bfbb7dba1604 (commit) from b8861cade0f00d2443358a43af8826b170673175 (commit) commit e0fe4255033fab3615006ca23358bfbb7dba1604 Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Mar 19 17:29:54 2013 -0400 Scale layout label text to the size of the button large text size will scale to the max size that fits into the button; medium size is 0.7 of that size; small is 0.475 of the max. The default text label size is now large. panel-plugin/xfce4-xkb-plugin.c |4 +- panel-plugin/xkb-cairo.c| 102 +-- panel-plugin/xkb-cairo.h| 16 +++--- 3 files changed, 55 insertions(+), 67 deletions(-) diff --git a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c index a485ea5..87770a9 100644 --- a/panel-plugin/xfce4-xkb-plugin.c +++ b/panel-plugin/xfce4-xkb-plugin.c @@ -303,7 +303,7 @@ xkb_load_config (t_xkb *xkb, const gchar *filename) xfce_rc_set_group (rcfile, NULL); xkb-display_type = xfce_rc_read_int_entry (rcfile, display_type, DISPLAY_TYPE_IMAGE); -xkb-display_textsize = xfce_rc_read_int_entry (rcfile, display_textsize, DISPLAY_TEXTSIZE_SMALL); +xkb-display_textsize = xfce_rc_read_int_entry (rcfile, display_textsize, DISPLAY_TEXTSIZE_LARGE); xkb-group_policy = xfce_rc_read_int_entry (rcfile, group_policy, GROUP_POLICY_PER_APPLICATION); xfce_rc_close (rcfile); @@ -318,7 +318,7 @@ static void xkb_load_default (t_xkb *xkb) { xkb-display_type = DISPLAY_TYPE_IMAGE; -xkb-display_textsize = DISPLAY_TEXTSIZE_SMALL; +xkb-display_textsize = DISPLAY_TEXTSIZE_LARGE; xkb-group_policy = GROUP_POLICY_PER_APPLICATION; } diff --git a/panel-plugin/xkb-cairo.c b/panel-plugin/xkb-cairo.c index ff1f5e9..af598a7 100644 --- a/panel-plugin/xkb-cairo.c +++ b/panel-plugin/xkb-cairo.c @@ -27,7 +27,7 @@ #include xkb-util.h #include xfce4-xkb-plugin.h -#define XKB_PREFERRED_FONT Courier New, Courier 10 Pitch, Monospace Bold %dpx +#define XKB_PREFERRED_FONT Courier New, Courier 10 Pitch, Monospace Bold #define xkb_cairo_arc_for_flag(cr, x, y, r, a1, a2) \ xx = layoutx + width - 12 + x; \ @@ -126,29 +126,31 @@ xkb_cairo_draw_flag (cairo_t *cr, void xkb_cairo_draw_label (cairo_t *cr, const gchar *group_name, - gint panel_size, - gint actual_width, - gint actual_height, - gint width, - gint height, - gint variant_markers_count, - gint textsize, - GdkColor fgcolor) + const gint panel_size, + const gint actual_width, + const gint actual_height, + const gint width, + const gint height, + const gint variant_markers_count, + const gint textsize, + const GdkColor fgcolor) { gchar *normalized_group_name; -/* gchar font_str[80]; */ gint pango_width, pango_height; -double layoutx, layouty; +double layoutx, layouty, text_width, text_height; double xx, yy; double scalex, scaley; gint i; -double radius; +double radius, diameter; PangoLayout *layout; PangoFontDescription *desc; g_assert (cr != NULL); +DBG (actual width/height: %d/%d; markers: %d, + actual_width, actual_height, variant_markers_count); + layout = pango_cairo_create_layout (cr); normalized_group_name = xkb_util_normalize_group_name (group_name); @@ -161,63 +163,53 @@ xkb_cairo_draw_label (cairo_t *cr, } pango_layout_set_text (layout, normalized_group_name, -1); -/* switch (textsize){ */ -/* case DISPLAY_TEXTSIZE_SMALL: */ -/* default:/\* catch misconfiguration *\/ */ -/* g_sprintf (font_str, XKB_PREFERRED_FONT, (int)(0.475 * panel_size) ); */ -/* break; */ -/* case DISPLAY_TEXTSIZE_MEDIUM: */ -/* g_sprintf (font_str, XKB_PREFERRED_FONT, (int)(0.700 * panel_size) ); */ -/* break; */ -/* case DISPLAY_TEXTSIZE_LARGE: */ -/* g_sprintf (font_str, XKB_PREFERRED_FONT, (int)(1.000 * panel_size) ); */ -/* break; */ -/* } */ - -/* DBG (font: %s, font_str); */ - -//desc = pango_font_description_from_string (font_str); -desc = pango_font_description_from_string( Courier New, Courier 10 Pitch, Monospace Bold ); + +desc = pango_font_description_from_string ( XKB_PREFERRED_FONT ); pango_layout_set_font_description (layout, desc); pango_font_description_free (desc); gdk_cairo_set_source_color (cr, fgcolor); pango_layout_get_pixel_size (layout, pango_width, pango_height); - -/* layoutx = (int) (actual_width
[Xfce4-commits] xfce4-xkb-plugin:master disable static libs by default when initing libtool
Updating branch refs/heads/master to 63cda4061481d5c957006256d989ce2ec734bc0c (commit) from c696d20687631bb3300cf9cfa6bd58bc2c27f59e (commit) commit 63cda4061481d5c957006256d989ce2ec734bc0c Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Mar 19 20:48:09 2013 -0400 disable static libs by default when initing libtool Bug 6920 configure.in.in |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/configure.in.in b/configure.in.in index 35d88e9..4da9f84 100644 --- a/configure.in.in +++ b/configure.in.in @@ -39,8 +39,9 @@ dnl AC_PROG_CC() AC_PROG_LD() AC_PROG_INSTALL() -AC_PROG_LIBTOOL() AC_PROG_INTLTOOL() +LT_PREREQ([2.2.6]) +LT_INIT([disable-static]) dnl *** dnl *** Check for UNIX variants *** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Get rid of a few warnings in configure.in.in
Updating branch refs/heads/master to 451e5b94f88e33767afcac9c071ffe22b0ec226c (commit) from 63cda4061481d5c957006256d989ce2ec734bc0c (commit) commit 451e5b94f88e33767afcac9c071ffe22b0ec226c Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Mar 19 20:51:29 2013 -0400 Get rid of a few warnings in configure.in.in Running autogen.sh/configure will no longer warn about needing AC_USE_SYSTEM_EXTENSIONS and AM_PROG_CC_C_O. configure.in.in | 20 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/configure.in.in b/configure.in.in index 4da9f84..ff769d3 100644 --- a/configure.in.in +++ b/configure.in.in @@ -19,7 +19,7 @@ m4_define([xkb_version], [xkb_version_major().xkb_version_minor().xkb_version_mi dnl *** dnl *** Initialize autoconf *** dnl *** -AC_COPYRIGHT([Copyright (c) 2006-2012 +AC_COPYRIGHT([Copyright (c) 2006-2013 The Xfce development team. All rights reserved.]) AC_INIT([xfce4-xkb-plugin], [xkb_version], [http://bugzilla.xfce.org/], [xfce4-xkb-plugin]) AC_PREREQ([2.50]) @@ -33,6 +33,14 @@ AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar]) AM_CONFIG_HEADER([config.h]) AM_MAINTAINER_MODE() +dnl *** +dnl *** Check for UNIX variants *** +dnl *** +AC_AIX() +AC_ISC_POSIX() +AC_MINIX() +AM_CONDITIONAL([HAVE_CYGWIN], [test `uname | grep \CYGWIN\` != ]) + dnl dnl *** Check for basic programs *** dnl @@ -42,14 +50,10 @@ AC_PROG_INSTALL() AC_PROG_INTLTOOL() LT_PREREQ([2.2.6]) LT_INIT([disable-static]) +AM_PROG_CC_C_O() -dnl *** -dnl *** Check for UNIX variants *** -dnl *** -AC_AIX() -AC_ISC_POSIX() -AC_MINIX() -AM_CONDITIONAL([HAVE_CYGWIN], [test `uname | grep \CYGWIN\` != ]) +dnl Check for standard header files +AC_HEADER_STDC dnl * dnl *** Check for X11 *** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Print debug configuration after running configure
Updating branch refs/heads/master to 8584df77c2346abf2b89246af826c8a17f413e69 (commit) from 451e5b94f88e33767afcac9c071ffe22b0ec226c (commit) commit 8584df77c2346abf2b89246af826c8a17f413e69 Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Mar 19 20:55:06 2013 -0400 Print debug configuration after running configure Also, delete some unused and commented out lines. configure.in.in | 22 +- 1 files changed, 9 insertions(+), 13 deletions(-) diff --git a/configure.in.in b/configure.in.in index ff769d3..723c5a7 100644 --- a/configure.in.in +++ b/configure.in.in @@ -76,19 +76,6 @@ XDT_CHECK_PACKAGE([LIBXKLAVIER], [libxklavier], [5.0]) XDT_CHECK_PACKAGE([LIBRSVG], [librsvg-2.0], [2.18]) XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-1.0], [2.12]) -dnl AC_ARG_ENABLE([debug], -dnlAC_HELP_STRING([--enable-plugin-debug], -dnl[Enable debug messages output (default=disabled)]), -dnl[ac_cv_enable_dummy_scripts=$enableval], -dnl[ac_cv_enable_dummy_scripts=no]) -dnl if test x$ac_cv_enable_dummy_scripts = xno; then -dnlXKB_DEBUG= -dnl else -dnlXKB_DEBUG=-DXKB_DEBUG -dnl fi -dnl AC_SUBST(XKB_DEBUG) - - dnl *** dnl *** Check for debugging support *** dnl *** @@ -100,3 +87,12 @@ flags/Makefile Makefile po/Makefile.in ]) + +dnl *** +dnl *** Print configuration *** +dnl *** +echo +echo Build Configuration: +echo +echo * Debug Support:$enable_debug +echo ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Remove generated files from git
Updating branch refs/heads/master to c696d20687631bb3300cf9cfa6bd58bc2c27f59e (commit) from e0fe4255033fab3615006ca23358bfbb7dba1604 (commit) commit c696d20687631bb3300cf9cfa6bd58bc2c27f59e Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Mar 19 19:24:53 2013 -0400 Remove generated files from git INSTALL | 365 depcomp | 630 --- 2 files changed, 0 insertions(+), 995 deletions(-) diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 7d1c323..000 --- a/INSTALL +++ /dev/null @@ -1,365 +0,0 @@ -Installation Instructions -* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008, 2009 Free Software Foundation, Inc. - - Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. This file is offered as-is, -without warranty of any kind. - -Basic Installation -== - - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following -more-detailed instructions are generic; see the `README' file for -instructions specific to this package. Some packages provide this -`INSTALL' file but do not implement all of the features documented -below. The lack of an optional feature in a given package is not -necessarily a bug. More recommendations for GNU packages can be found -in *note Makefile Conventions: (standards)Makefile Conventions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. Caching is -disabled by default to prevent problems with accidental use of stale -cache files. - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You need `configure.ac' if -you want to change it or regenerate `configure' using a newer version -of `autoconf'. - - The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. - - Running `configure' might take a while. While running, it prints - some messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package, generally using the just-built uninstalled binaries. - - 4. Type `make install' to install the programs and any data files and - documentation. When installing into a prefix owned by root, it is - recommended that the package be configured and built as a regular - user, and only the `make install' phase executed with root - privileges. - - 5. Optionally, type `make installcheck' to repeat any self-tests, but - this time using the binaries in their final installed location. - This target does not install anything. Running this target as a - regular user, particularly if the prior `make install' required - root privileges, verifies that the installation completed - correctly. - - 6. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - - 7. Often, you can also type `make uninstall' to remove the installed - files again. In practice, not all packages have tested that - uninstallation works correctly, even though it is required
[Xfce4-commits] xfce4-xkb-plugin:master Remove duplicate automake options
Updating branch refs/heads/master to 30e92d49efea3fc6085bde1a1dcb36097177f554 (commit) from 8584df77c2346abf2b89246af826c8a17f413e69 (commit) commit 30e92d49efea3fc6085bde1a1dcb36097177f554 Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Mar 19 20:56:00 2013 -0400 Remove duplicate automake options We already set them with AM_INIT_AUTOMAKE in configure.in.in Makefile.am |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 231adb2..e3c220b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,10 +2,6 @@ SUBDIRS = panel-plugin flags po -AUTOMAKE_OPTIONS = \ - 1.8 \ - dist-bzip2 - distclean-local: rm -rf *.cache *~ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Include git revision in dev build numbers
Updating branch refs/heads/master to f5528f22a936946e65218ddbc13c4834eb42df8d (commit) from 30e92d49efea3fc6085bde1a1dcb36097177f554 (commit) commit f5528f22a936946e65218ddbc13c4834eb42df8d Author: Igor Slepchin igor.slepc...@gmail.com Date: Wed Mar 20 10:59:47 2013 -0400 Include git revision in dev build numbers configure.in.in |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/configure.in.in b/configure.in.in index 723c5a7..97f3612 100644 --- a/configure.in.in +++ b/configure.in.in @@ -14,7 +14,9 @@ m4_define([xkb_version_major], [0]) m4_define([xkb_version_minor], [5]) m4_define([xkb_version_micro], [4]) m4_define([xkb_version_nano], [3]) -m4_define([xkb_version], [xkb_version_major().xkb_version_minor().xkb_version_micro()ifelse(xkb_version_nano(), [], [], .[xkb_version_nano()])]) +m4_define([xkb_version_build], [@REVISION@]) +m4_define([xkb_version_tag], [git]) +m4_define([xkb_version], [xkb_version_major().xkb_version_minor().xkb_version_micro()ifelse(xkb_version_nano(), [], [], [.xkb_version_nano()])ifelse(xkb_version_tag(), [git], [xkb_version_tag()-xkb_version_build()], [xkb_version_tag()])]) dnl *** dnl *** Initialize autoconf *** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Use nicer looking flag dimensions in tooltips
Updating branch refs/heads/master to 12bcc6ad143800e36a62ef181b297937bb0bde1e (commit) from f5528f22a936946e65218ddbc13c4834eb42df8d (commit) commit 12bcc6ad143800e36a62ef181b297937bb0bde1e Author: Igor Slepchin igor.slepc...@gmail.com Date: Wed Mar 20 12:50:25 2013 -0400 Use nicer looking flag dimensions in tooltips panel-plugin/xkb-config.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c index 3967131..70fc426 100644 --- a/panel-plugin/xkb-config.c +++ b/panel-plugin/xkb-config.c @@ -243,7 +243,7 @@ xkb_config_initialize_xkb_options (const XklConfigRec *config_rec) { GdkPixbuf *tmp = rsvg_handle_get_pixbuf (handle); group_data-tooltip_pixbuf = -gdk_pixbuf_scale_simple (tmp, 24, 24, GDK_INTERP_BILINEAR); +gdk_pixbuf_scale_simple (tmp, 30, 22, GDK_INTERP_BILINEAR); g_object_unref (tmp); rsvg_handle_close (handle, NULL); g_object_unref (handle); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:master Include rsvg-cairo.h for older librsvg versions
Updating branch refs/heads/master to 0c6d0d34ca9784a9c279ffd2f72b35597cfd981e (commit) from 655047e33de37eefa17d2325434e6cd784e893ae (commit) commit 0c6d0d34ca9784a9c279ffd2f72b35597cfd981e Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Mar 26 16:16:41 2013 -0400 Include rsvg-cairo.h for older librsvg versions librsvg 2.6.32 deprecated #including headers other than rsvg.h. Their standard way to check the version is LIBRSVG_CHECK_VERSION macro defined in librsvg-features.h. Unfortunately, including *that* header file directly is also deprecated starting with 2.6.32 and it was not pulled in by rsvg.h in earlier versions; hence, we need to resort to configure-time check. configure.in.in |2 ++ panel-plugin/xkb-cairo.c |4 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/configure.in.in b/configure.in.in index 97f3612..f57a901 100644 --- a/configure.in.in +++ b/configure.in.in @@ -76,6 +76,8 @@ XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0]) XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.8.0]) XDT_CHECK_PACKAGE([LIBXKLAVIER], [libxklavier], [5.0]) XDT_CHECK_PACKAGE([LIBRSVG], [librsvg-2.0], [2.18]) +dnl check librsvg version to see if including headers other than rsvg.h is deprecated +XDT_CHECK_OPTIONAL_PACKAGE([LIBRSVG_2_36_2], [librsvg-2.0], [2.36.2], [librsvg_2.36.2], [deprecated includes of librsvg header files (always leave enabled)], yes) XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-1.0], [2.12]) dnl *** diff --git a/panel-plugin/xkb-cairo.c b/panel-plugin/xkb-cairo.c index af598a7..27ad119 100644 --- a/panel-plugin/xkb-cairo.c +++ b/panel-plugin/xkb-cairo.c @@ -27,6 +27,10 @@ #include xkb-util.h #include xfce4-xkb-plugin.h +#ifndef HAVE_LIBRSVG_2_36_2 +#include librsvg/rsvg-cairo.h +#endif + #define XKB_PREFERRED_FONT Courier New, Courier 10 Pitch, Monospace Bold #define xkb_cairo_arc_for_flag(cr, x, y, r, a1, a2) \ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Creating branch 4.10_panel_support
Updating branch refs/heads/4.10_panel_support as new branch to d34f6b4ee2fede6d1652394664cb400ca7d32ed0 (commit) Branches are created implicitly by pushing. This mail only exists to let you know that there was code pushed to refs/heads/4.10_panel_support for the first time. Mails for the commits that lead to the creation of the branch will follow after this mail. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Fix memory corruption.
Updating branch refs/heads/4.10_panel_support to c258a60c55071a4c6fc100afddd7d0edc41dd192 (commit) from ae072268976b0f8ae0602581a338c7500f2c80f6 (commit) commit c258a60c55071a4c6fc100afddd7d0edc41dd192 Author: Igor Slepchin igor.slepc...@gmail.com Date: Thu Jul 19 01:59:40 2012 -0400 Fix memory corruption. g_free(c) in the original code was freeing memory at the pointer that was incremented a few times since the allocation. This is similar to ubuntu bug #899290 and fedora bug 589898. (cherry picked from commit ac73bc9de624d322b318c2eda0ace7f0bee97a64) panel-plugin/xkb-util.c | 15 +++ 1 files changed, 3 insertions(+), 12 deletions(-) diff --git a/panel-plugin/xkb-util.c b/panel-plugin/xkb-util.c index d0d0230..324928f 100644 --- a/panel-plugin/xkb-util.c +++ b/panel-plugin/xkb-util.c @@ -66,11 +66,10 @@ xkb_util_get_layout_string (const gchar *group_name, const gchar *variant) gchar* xkb_util_normalize_group_name (const gchar* group_name) { -gchar *c; +const gchar *c; gchar *result; gint cut_length; gint index_of_na = -1; -gint index_tmp = -1; if (!group_name) return NULL; @@ -78,27 +77,19 @@ xkb_util_normalize_group_name (const gchar* group_name) if (strlen (group_name) = 3) return g_strdup (group_name); -c = g_strdup (group_name); - -while (*c) +for (c = group_name; *c; c++) { -index_tmp++; - if (!((*c = 'a' *c = 'z') || (*c = 'A' *c = 'Z'))) { -index_of_na = index_tmp; +index_of_na = group_name - c; break; } - -c++; } cut_length = (index_of_na != -1 index_of_na = 3) ? index_of_na : 3; result = g_strndup (group_name, cut_length); -g_free (c); - return result; } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Add license and plugin version to the About dialog.
Updating branch refs/heads/4.10_panel_support to c7e8f482fd2ffd49feda3feea729f24a88271f37 (commit) from c258a60c55071a4c6fc100afddd7d0edc41dd192 (commit) commit c7e8f482fd2ffd49feda3feea729f24a88271f37 Author: Igor Slepchin igor.slepc...@gmail.com Date: Thu Jul 19 16:47:59 2012 -0400 Add license and plugin version to the About dialog. Also, let the compiler determine the length of authors array. (cherry picked from commit ffbcc2b8473cd1b2896b11c4b1c6f2e226ec1cd8) panel-plugin/xkb-settings-dialog.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/panel-plugin/xkb-settings-dialog.c b/panel-plugin/xkb-settings-dialog.c index e792725..060dac9 100644 --- a/panel-plugin/xkb-settings-dialog.c +++ b/panel-plugin/xkb-settings-dialog.c @@ -747,7 +747,7 @@ void xfce_xkb_about (XfcePanelPlugin *plugin) { GtkWidget *about; -const gchar* authors[3] = { +const gchar* authors[] = { Alexander Iliev sasoil...@mamul.org, Gauvain Pocentek gauvainpocen...@gmail.com, NULL @@ -756,8 +756,12 @@ xfce_xkb_about (XfcePanelPlugin *plugin) about = gtk_about_dialog_new (); gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (about), _(Keyboard Layouts Plugin)); +gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (about), +PACKAGE_VERSION); gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG (about), NULL); +gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (about), +xfce_get_license_text (XFCE_LICENSE_TEXT_GPL)); gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (about), (const gchar**) authors); gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG (about), ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Look for .rc file in system dirs as well.
Updating branch refs/heads/4.10_panel_support to 264ff9a488c5d4ddfabe6d954e509dd42301cf63 (commit) from c7e8f482fd2ffd49feda3feea729f24a88271f37 (commit) commit 264ff9a488c5d4ddfabe6d954e509dd42301cf63 Author: Szalai Bandi szalai.ba...@gmail.com Date: Mon Jul 23 14:33:07 2012 -0400 Look for .rc file in system dirs as well. The patch is from bug 3263. (cherry picked from commit cb50bc31797bf34d4896fefdcd4c99641131854a) panel-plugin/xfce4-xkb-plugin.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c index 6a0635a..e137ee2 100644 --- a/panel-plugin/xfce4-xkb-plugin.c +++ b/panel-plugin/xfce4-xkb-plugin.c @@ -168,7 +168,7 @@ xkb_new (XfcePanelPlugin *plugin) xkb-settings = g_new0 (t_xkb_settings, 1); xkb-plugin = plugin; -filename = xfce_panel_plugin_save_location (plugin, TRUE); +filename = xfce_panel_plugin_lookup_rc_file (plugin); if ((!filename) || (!xkb_load_config (xkb, filename))) { xkb_load_default (xkb); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Reset the current group to 0 whenever config change is detected.
Updating branch refs/heads/4.10_panel_support to eb9727605d273572f03509a5c74c2d47fca6e6a7 (commit) from 264ff9a488c5d4ddfabe6d954e509dd42301cf63 (commit) commit eb9727605d273572f03509a5c74c2d47fca6e6a7 Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon Jul 23 14:34:40 2012 -0400 Reset the current group to 0 whenever config change is detected. This avoids some weirdness when the layout change causes the current group to change/disappear. Besides, we're resetting the rest of the settings anyway. (cherry picked from commit d7490a02ab8cd69a6e161e160f76adc2a600105e) panel-plugin/xkb-config.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c index 2c5af77..b2199b7 100644 --- a/panel-plugin/xkb-config.c +++ b/panel-plugin/xkb-config.c @@ -570,7 +570,10 @@ xkb_config_xkl_config_changed (XklEngine *engine) xkb_config_update_settings (config-settings); if (config-callback != NULL) -config-callback (xkb_config_get_current_group (), TRUE, config-callback_data); +{ +xkb_config_set_group (0); +config-callback (0, TRUE, config-callback_data); +} } gint ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Use configured text size when drawing text labels for missing flags. (cherry picked from commit c627b1b55afd107c634fd8530c781fbea2603829)
Updating branch refs/heads/4.10_panel_support to e9160a826a448fa101c960eb19fba90c156967c0 (commit) from eb9727605d273572f03509a5c74c2d47fca6e6a7 (commit) commit e9160a826a448fa101c960eb19fba90c156967c0 Author: Igor Slepchin igor.slepc...@gmail.com Date: Wed Jul 25 23:14:59 2012 -0400 Use configured text size when drawing text labels for missing flags. (cherry picked from commit c627b1b55afd107c634fd8530c781fbea2603829) panel-plugin/xkb-cairo.c |3 ++- panel-plugin/xkb-cairo.h |1 + panel-plugin/xkb-callbacks.c |1 + 3 files changed, 4 insertions(+), 1 deletions(-) diff --git a/panel-plugin/xkb-cairo.c b/panel-plugin/xkb-cairo.c index 3b828ec..86af836 100644 --- a/panel-plugin/xkb-cairo.c +++ b/panel-plugin/xkb-cairo.c @@ -55,6 +55,7 @@ xkb_cairo_draw_flag (cairo_t *cr, gint width, gint height, gint variant_markers_count, + gint textsize, GdkColor fgcolor) { gchar *filename; @@ -81,7 +82,7 @@ xkb_cairo_draw_flag (cairo_t *cr, actual_width, actual_height, width, height, variant_markers_count, -DISPLAY_TEXTSIZE_SMALL, // not used for flag layout +textsize, fgcolor); return; } diff --git a/panel-plugin/xkb-cairo.h b/panel-plugin/xkb-cairo.h index a8ecf32..e29d82b 100644 --- a/panel-plugin/xkb-cairo.h +++ b/panel-plugin/xkb-cairo.h @@ -42,6 +42,7 @@ voidxkb_cairo_draw_flag (cairo_t *cr, gint width, gint height, gint variant_markers_count, + gint textsize, GdkColor fgcolor); voidxkb_cairo_draw_label(cairo_t *cr, diff --git a/panel-plugin/xkb-callbacks.c b/panel-plugin/xkb-callbacks.c index d12e086..36e5375 100644 --- a/panel-plugin/xkb-callbacks.c +++ b/panel-plugin/xkb-callbacks.c @@ -121,6 +121,7 @@ xkb_plugin_layout_image_exposed (GtkWidget *widget, actual_hsize, actual_vsize, xkb-hsize, xkb-vsize, xkb_config_variant_index_for_group (-1), +xkb-display_textsize, fgcolor ); } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Add myself to authors list.
Updating branch refs/heads/4.10_panel_support to 2a4fefb012360b1d4b6c91f48841f90ed8505ba5 (commit) from e9160a826a448fa101c960eb19fba90c156967c0 (commit) commit 2a4fefb012360b1d4b6c91f48841f90ed8505ba5 Author: Igor Slepchin igor.slepc...@gmail.com Date: Fri Jul 27 21:22:41 2012 -0400 Add myself to authors list. My 30sec of fame... (cherry picked from commit 18afdce6c6e868426fd8f188478dabc23fb4cf46) AUTHORS|1 + panel-plugin/xkb-settings-dialog.c |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/AUTHORS b/AUTHORS index 57f793b..9706e65 100644 --- a/AUTHORS +++ b/AUTHORS @@ -2,3 +2,4 @@ Benedikt Meurer benedikt.meu...@unix-ag.uni-siegen.de Alexander Iliev sasoil...@mamul.org Gauvain Pocentek gauvainpocen...@gmail.com Azamat H. Hackimov azamat.hacki...@gmail.com +Igor Slepchin igor.slepc...@gmail.com \ No newline at end of file diff --git a/panel-plugin/xkb-settings-dialog.c b/panel-plugin/xkb-settings-dialog.c index 060dac9..0dab764 100644 --- a/panel-plugin/xkb-settings-dialog.c +++ b/panel-plugin/xkb-settings-dialog.c @@ -750,6 +750,7 @@ xfce_xkb_about (XfcePanelPlugin *plugin) const gchar* authors[] = { Alexander Iliev sasoil...@mamul.org, Gauvain Pocentek gauvainpocen...@gmail.com, +Igor Slepchin igor.slepc...@gmail.com, NULL }; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Stop drawing the layout label if normalized_group_name fails UTF8 validity check. (cherry picked from commit 91940da28c9b4b7445cd058fd07a84e9ca0d5
Updating branch refs/heads/4.10_panel_support to fba80b77c469f6731d140ff61fabdec8b3f5e695 (commit) from 2a4fefb012360b1d4b6c91f48841f90ed8505ba5 (commit) commit fba80b77c469f6731d140ff61fabdec8b3f5e695 Author: Igor Slepchin igor.slepc...@gmail.com Date: Fri Jul 27 23:59:23 2012 -0400 Stop drawing the layout label if normalized_group_name fails UTF8 validity check. (cherry picked from commit 91940da28c9b4b7445cd058fd07a84e9ca0d58c8) panel-plugin/xkb-cairo.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/panel-plugin/xkb-cairo.c b/panel-plugin/xkb-cairo.c index 86af836..8de3ec5 100644 --- a/panel-plugin/xkb-cairo.c +++ b/panel-plugin/xkb-cairo.c @@ -159,6 +159,7 @@ xkb_cairo_draw_label (cairo_t *cr, { g_object_unref (layout); g_free (normalized_group_name); +return; } pango_layout_set_text (layout, normalized_group_name, -1); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Get rid of a redundant if (handle) check.
Updating branch refs/heads/4.10_panel_support to 0776b4226b2e2d705ce1c3c4817133c6b0fe9895 (commit) from 60213ecc3500cc35fbfc38ff00387309b7762842 (commit) commit 0776b4226b2e2d705ce1c3c4817133c6b0fe9895 Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon Sep 10 17:50:09 2012 -0400 Get rid of a redundant if (handle) check. We did the same exact check a few lines earlier. (cherry picked from commit 1474d4a846cc20781f99b7718e4b7372d47be55f) panel-plugin/xkb-cairo.c | 45 - 1 files changed, 20 insertions(+), 25 deletions(-) diff --git a/panel-plugin/xkb-cairo.c b/panel-plugin/xkb-cairo.c index 8de3ec5..9c80444 100644 --- a/panel-plugin/xkb-cairo.c +++ b/panel-plugin/xkb-cairo.c @@ -92,39 +92,34 @@ xkb_cairo_draw_flag (cairo_t *cr, scalex = (double) (width - 4) / dim.width; scaley = (double) (height - 4) / dim.height; -if (handle) -{ -layoutx = (actual_width - width) / 2 + 2; -layouty = (actual_height - height) / 2 + 2; -cairo_translate (cr, layoutx, layouty); - -//cairo_translate (cr, 2, 2); +layoutx = (actual_width - width) / 2 + 2; +layouty = (actual_height - height) / 2 + 2; +cairo_translate (cr, layoutx, layouty); -cairo_save (cr); +cairo_save (cr); -cairo_scale (cr, scalex, scaley); -rsvg_handle_render_cairo (handle, cr); +cairo_scale (cr, scalex, scaley); +rsvg_handle_render_cairo (handle, cr); -cairo_restore (cr); +cairo_restore (cr); -/* draw variant_markers_count circles */ -for (i = 0; i variant_markers_count; i++) -{ -cairo_set_source_rgb (cr, 0, 0, 0); - -cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND); -cairo_set_line_width (cr, 1); +/* draw variant_markers_count circles */ +for (i = 0; i variant_markers_count; i++) +{ +cairo_set_source_rgb (cr, 0, 0, 0); -xkb_cairo_arc_for_flag (cr, -(7 * i) + 4, 4, 2.5, 0, 2 * G_PI); +cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND); +cairo_set_line_width (cr, 1); -cairo_set_source_rgb (cr, 0, 0, 0); -cairo_fill_preserve (cr); -cairo_set_source_rgb (cr, 1, 1, 1); -cairo_stroke (cr); -} +xkb_cairo_arc_for_flag (cr, -(7 * i) + 4, 4, 2.5, 0, 2 * G_PI); -g_object_unref (handle); +cairo_set_source_rgb (cr, 0, 0, 0); +cairo_fill_preserve (cr); +cairo_set_source_rgb (cr, 1, 1, 1); +cairo_stroke (cr); } + +g_object_unref (handle); } void ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Add Kazakh flag (bug #9186). (cherry picked from commit 886096b02e9f5ac415ba39c634fd7530124c7d96)
Updating branch refs/heads/4.10_panel_support to 60213ecc3500cc35fbfc38ff00387309b7762842 (commit) from fba80b77c469f6731d140ff61fabdec8b3f5e695 (commit) commit 60213ecc3500cc35fbfc38ff00387309b7762842 Author: Igor Slepchin igor.slepc...@gmail.com Date: Wed Aug 22 17:32:38 2012 -0400 Add Kazakh flag (bug #9186). (cherry picked from commit 886096b02e9f5ac415ba39c634fd7530124c7d96) flags/Makefile.am |1 + flags/kz.svg | 121 + 2 files changed, 122 insertions(+), 0 deletions(-) diff --git a/flags/Makefile.am b/flags/Makefile.am index b48d931..d432851 100644 --- a/flags/Makefile.am +++ b/flags/Makefile.am @@ -48,6 +48,7 @@ flags_DATA = ae.svg \ kp.svg \ kr.svg \ kw.svg \ + kz.svg \ la.svg \ lb.svg \ lt.svg \ diff --git a/flags/kz.svg b/flags/kz.svg new file mode 100644 index 000..3f86704 --- /dev/null +++ b/flags/kz.svg @@ -0,0 +1,121 @@ +svg xmlns=http://www.w3.org/2000/svg; xmlns:xlink=http://www.w3.org/1999/xlink; width=600 height=300 viewBox=0 0 2000 1000 + +titleFlag of Kazakhstan/title + +defs + +path id=be d=M0-76.45c4-0.05,5.5-2.55,5.5-5.55,0-4-5.5-23.05-5.5-23.05s-5.5,19.05-5.5,23.05c0,3,1.5,5.55,5.5,5.55z/ + +path id=orn d=M-1,15c0-10,9-15.14,16.072-15.14,9.528,0,14.601,5.683,14.601,13.122,0,4.2169-0.77453,6.863-2.7237,10.899,0,0-15.717,32.606-21.836,45.217-0.76309,1.5729-1.0093,3.3634-1.0093,5.9885,0,4.0539,3.9416,7.3673,8.0744,7.4688,3.7675,0.094,7.8725-3.5039,7.8725-7.6033,0-4.9796-2.5894-7.1996-5.2483-7.1996-3.2718,0-4.5755,1.3418-4.5755,3.6335,0,1.5968,0.77308,2.2877,1.884,2.2877,2.8063,0,2.0186-3.768,2.0186-3.768,1.3938,0.3044,2.5388,1.725,1.884,3.4989,1.0196,0.22647,1.9747,0.7604,2.7251,1.6149-0.75228,0.72756-1.6152,1.2892-2.7251,1.4803,0.65722,2.1644-0.221,3.222-2.1195,3.6671,0.38311-0.8326,0.39629-1.5985,0.26914-2.3214-2.9889,0.84788-7.5697-0.5014-7.5697-5.652,0-5.1138,3.5576-9.4196,10.228-8.3435-1.5869-0.75687-2.394-2.3055-2.5569-4.0372,1.2112,0.471,2.5569,0.53829,2.5569,0.53829-0.77989-1.3719-1.8631-2.5544-1.8167-5.2483,1.2367,0.56086,2.3851,1.5994,3.9699,0.94201-2.4873-4.8826,0.56859-11.599,8.3435-13.188-2.8455,3.3273-4.239,6.9201-4.239,10.497,0,11.592,3.2297,13.5 4,3.2297,21.599,0,3.3717-1.7375,7.013-5.181,9.4874v-0.13457c2.276,0.608,3.734,1.726,4.572,3.245-5.2,1.471-12.759,1.444-16.818-0.149-4.6656-0.539-7.9221-4.11-8.8818-5.922-0.95972-1.811-2.8237-8.364,0-14.264,3.0903-6.457,17.661-37.277,22.204-46.966,0.9636-2.055,1.5476-4.2343,1.5476-6.5941,0-5.9349-5.4502-8.0071-8.5454-8.0071-3.7007,0-7.4688,2.8125-7.4688,6.3249,0,2.2256,1.2112,3.5662,2.9606,3.5662,4.1833,0,3.9292-3.55,3.0952-5.7866,2.6035,1.1676,4.1168,3.252,3.7007,5.4502,1.474,0.2014,2.877,0.89888,4.1717,2.355-1.0187,1.2832-2.2612,2.2532-4.1717,2.2877,0.83444,3.41-1.4543,4.8522-3.7007,5.652,0.71068-2.5027,1.1772-5.3829-3.0952-5.3829-3.115,0-5.5679-0.53829-6.9978-2.5569-0.084108,2.6914-0.33643,13.323-0.33643,13.323-0.17943,3.995,5.3605,3.8808,8.8818,2.6914-1.3289,4.6018-4.0543,7.0898-10.362,6.4595,1.5308,0.63922,3.1625,2.0762,3.1625,4.8446-0.001,3.746-3.0475,7.896-5.0475,9.123l-1-39z/ + +path id=uorn d=m0-35.599s4.7531-3.9844,6.3671-1.9859c2.5961,3.2144-7.982,19.225-7.982,24.863,0,9.255,6.1902,11.772,13.834,13.093,5.129,0.8871,13.481-0.371,13.481-0.371-1.5725-2.1079-2.5953-2.729-5.245-2.8975,2.9499-1.5278,5.9538-4.8441,5.9538-10.007,0-7.9617-3.2855-11.243-3.2855-20.219,0-4.9792,4.0929-11.318,4.0929-11.318-7.2343,0.72228-10.82,7.4047-8.7799,12.745-1.1516,0.16548-2.1972-0.09311-3.0952-0.94201-0.52945,1.4803,0.30635,3.1985,1.426,4.6788-0.90173,0.48068-1.564,0.19242-3-0.10332,0.13618,1.5252,1.0523,3.1455,3.2936,4.6706-6.5041-1.6845-10.506,2.8376-10.506,7.5715,0,3.5758,2.5119,6.1386,4.9671,6.1386,0.79347,0,1.959-0.326,2.6166-0.8156,0.46352,0.98414,0.22467,2.3013-0.25282,3.2855,1.7996-0.47454,2.9418-1.5407,2.1287-3.7599,1.3822-0.12667,2.4817-0.59257,3.2297-1.4803-0.75781-0.96814-1.9074-1.5258-3.2297-1.4803,1.0064-2.0718-0.11515-3.2317-1.7494-4.1718,0,0,1.0393,4.1717-1.6149,4.1717-1.1935,0-2.281-0.38758-2.281-2.1422,0-1.5279,1.339-3.6444,4.4341-3.5098,3.0952,0. 13457,5.6045,2.1289,5.6045,7.0577,0,4.5468-3.6762,6.8081-8.5205,6.9542-4.3688,0.13457-7.6662-2.2263-7.6662-6.7219,0-5.9835,8.6588-19.622,8.6588-24.954,0-4.0006-3.6064-6.2337-7.1351-6.2337-4.5755,0-8.4359,4.5197-8.4359,4.5197l2.688,3.362z/ + +/defs + +rect height=1000 width=2000 y=0 x=0 fill=#00afca/ + +use xlink:href=#use4303 transform=matrix(-1,0,0,1,240,0) height=1000 width=2000 y=0 x=0/ + +use xlink:href=#be transform=matrix(1.960637,0.3899949,-0.3899949,1.960637,1080.4716,420) height=500 width=1000 y=0 x=0 fill=#fec50c/ + +use xlink:href=#be transform=matrix(1.8468795,0.7650026,-0.7650026,1.8468795,1080.4716,420) height=500 width=1000 y=0 x=0 fill=#fec50c/ + +use xlink:href=#be transform=matrix
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Update the tooltip whenever the selected layout changes.
Updating branch refs/heads/4.10_panel_support to 5f5cd2151d9961c5bc89db983228e4e8074b331f (commit) from 0776b4226b2e2d705ce1c3c4817133c6b0fe9895 (commit) commit 5f5cd2151d9961c5bc89db983228e4e8074b331f Author: Enrique cqu...@ovi.com Date: Tue Sep 18 13:34:58 2012 -0400 Update the tooltip whenever the selected layout changes. Bug 9286. (cherry picked from commit 6a0acf5d78451e4c4648d99a1b7f4c0d52d78a66) panel-plugin/xfce4-xkb-plugin.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c index e137ee2..2afc9bb 100644 --- a/panel-plugin/xfce4-xkb-plugin.c +++ b/panel-plugin/xfce4-xkb-plugin.c @@ -420,8 +420,16 @@ xkb_initialize_menu (t_xkb *xkb) void xkb_refresh_gui (t_xkb *xkb) { +GdkDisplay * display; + /* Part of the image may remain visible after display type change */ gtk_widget_queue_draw_area (xkb-btn, 0, 0, xkb-button_hsize, xkb-button_vsize); + +display = gdk_display_get_default(); +if (display) +{ +gtk_tooltip_trigger_tooltip_query(display); +} } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Don't crash if keyboard model is not set
Updating branch refs/heads/4.10_panel_support to cdc7ac5c1759e5b065ec6ddf95f57d10d0fc87cc (commit) from 5f5cd2151d9961c5bc89db983228e4e8074b331f (commit) commit cdc7ac5c1759e5b065ec6ddf95f57d10d0fc87cc Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon Mar 25 16:41:33 2013 -0400 Don't crash if keyboard model is not set panel-plugin/xkb-settings-dialog.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/panel-plugin/xkb-settings-dialog.c b/panel-plugin/xkb-settings-dialog.c index 0dab764..0d19c43 100644 --- a/panel-plugin/xkb-settings-dialog.c +++ b/panel-plugin/xkb-settings-dialog.c @@ -304,7 +304,7 @@ xkb_settings_set_kbd_combo_default_value (t_xkb *xkb) return; gtk_tree_model_get (model, iter, NOM, id, -1); -if (strcmp (id, config-model) == 0 ) +if (config-model strcmp (id, config-model) == 0 ) gtk_combo_box_set_active_iter (GTK_COMBO_BOX (xkb-kbd_model_combo), iter); else { @@ -313,7 +313,7 @@ xkb_settings_set_kbd_combo_default_value (t_xkb *xkb) g_free (id); gtk_tree_model_get (model, iter, NOM, id, -1); -if (strcmp (id, config-model) == 0) +if (config-model strcmp (id, config-model) == 0) { gtk_combo_box_set_active_iter (GTK_COMBO_BOX (xkb-kbd_model_combo), iter); break; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Fix rsvg #include warning
Updating branch refs/heads/4.10_panel_support to 964fcb1cd2aa57c2d92cd6ab0591618eb85643dd (commit) from cdc7ac5c1759e5b065ec6ddf95f57d10d0fc87cc (commit) commit 964fcb1cd2aa57c2d92cd6ab0591618eb85643dd Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon Mar 11 17:43:10 2013 -0400 Fix rsvg #include warning Including rsvg headers other than rsvg.h produces a warning; see commit 3b8adaa7e780b85695306292dfb23107d219bb34 in librsvg. (cherry picked from commit 9a4599dfe96247d0b3095aeec085b7c8e669545a) panel-plugin/xkb-cairo.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/panel-plugin/xkb-cairo.h b/panel-plugin/xkb-cairo.h index e29d82b..13b790a 100644 --- a/panel-plugin/xkb-cairo.h +++ b/panel-plugin/xkb-cairo.h @@ -31,7 +31,6 @@ #include gdk/gdk.h #include cairo/cairo.h #include librsvg/rsvg.h -#include librsvg/rsvg-cairo.h #include pango/pangocairo.h voidxkb_cairo_draw_flag (cairo_t *cr, ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Compatibility with 4.10 panel
Updating branch refs/heads/4.10_panel_support to 71a87726f0cbbad1df2143c7f84d885a1b6df7e9 (commit) from 964fcb1cd2aa57c2d92cd6ab0591618eb85643dd (commit) commit 71a87726f0cbbad1df2143c7f84d885a1b6df7e9 Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon Mar 25 16:42:19 2013 -0400 Compatibility with 4.10 panel The xkb plugin now always occupies one row only (xfce_panel_plugin_set_small). If the panel has only one row, the plugin requests a rectangular shape (just as it used to); with more than one panel row, the plugin will be the standard square so as to better blend in with other plugins at the expense of having smaller display area. Bug 8762 (largely cherry picked from commit b8861cade0f00d2443358a43af8826b170673175) panel-plugin/xfce4-xkb-plugin.c | 29 +++-- panel-plugin/xkb-cairo.c|4 +++- panel-plugin/xkb-callbacks.c| 25 +++-- panel-plugin/xkb-config.c |9 - 4 files changed, 53 insertions(+), 14 deletions(-) diff --git a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c index 2afc9bb..879346b 100644 --- a/panel-plugin/xfce4-xkb-plugin.c +++ b/panel-plugin/xfce4-xkb-plugin.c @@ -90,6 +90,8 @@ xfce_xkb_construct (XfcePanelPlugin *plugin) t_xkb *xkb = xkb_new (plugin); xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, UTF-8); +xfce_panel_plugin_set_small (plugin, TRUE); + g_signal_connect (plugin, orientation-changed, G_CALLBACK (xfce_xkb_orientation_changed), xkb); @@ -179,6 +181,7 @@ xkb_new (XfcePanelPlugin *plugin) gtk_button_set_relief (GTK_BUTTON (xkb-btn), GTK_RELIEF_NONE); gtk_container_add (GTK_CONTAINER (xkb-plugin), xkb-btn); xfce_panel_plugin_add_action_widget (xkb-plugin, xkb-btn); +xkb-button_state = GTK_STATE_NORMAL; gtk_widget_show (xkb-btn); g_signal_connect (xkb-btn, clicked, G_CALLBACK (xkb_plugin_button_clicked), xkb); @@ -335,17 +338,37 @@ xkb_load_default (t_xkb *xkb) static gboolean xkb_calculate_sizes (t_xkb *xkb, GtkOrientation orientation, gint panel_size) { +guint nrows; + +nrows = xfce_panel_plugin_get_nrows (xkb-plugin); +panel_size /= nrows; +TRACE (calculate_sizes(%p: %d,%d), xkb, panel_size, nrows); switch (orientation) { case GTK_ORIENTATION_HORIZONTAL: xkb-vsize = panel_size; -xkb-hsize = (int) (1.33 * panel_size); +if (nrows 1) +{ +xkb-hsize = xkb-vsize; +} +else +{ +xkb-hsize = (int) (1.33 * panel_size); +} + gtk_widget_set_size_request (xkb-btn, xkb-hsize, xkb-vsize); break; case GTK_ORIENTATION_VERTICAL: xkb-hsize = panel_size; -xkb-vsize = (int) (0.75 * panel_size); +if (nrows 1) +{ +xkb-vsize = xkb-hsize; +} +else +{ +xkb-vsize = (int) (0.75 * panel_size); +} if (xkb-vsize 10) xkb-vsize = 10; gtk_widget_set_size_request (xkb-btn, xkb-hsize, xkb-vsize); break; @@ -353,6 +376,8 @@ xkb_calculate_sizes (t_xkb *xkb, GtkOrientation orientation, gint panel_size) break; } +DBG (size requested: h/v (%p: %d/%d), xkb, xkb-hsize, xkb-vsize); + xkb_refresh_gui (xkb); return TRUE; } diff --git a/panel-plugin/xkb-cairo.c b/panel-plugin/xkb-cairo.c index 9c80444..8a3a4ef 100644 --- a/panel-plugin/xkb-cairo.c +++ b/panel-plugin/xkb-cairo.c @@ -119,6 +119,7 @@ xkb_cairo_draw_flag (cairo_t *cr, cairo_stroke (cr); } +rsvg_handle_close (handle, NULL); g_object_unref (handle); } @@ -150,7 +151,8 @@ xkb_cairo_draw_label (cairo_t *cr, layout = pango_cairo_create_layout (cr); normalized_group_name = xkb_util_normalize_group_name (group_name); -if (!g_utf8_validate (normalized_group_name, -1, NULL)) +if (!normalized_group_name || +!g_utf8_validate (normalized_group_name, -1, NULL)) { g_object_unref (layout); g_free (normalized_group_name); diff --git a/panel-plugin/xkb-callbacks.c b/panel-plugin/xkb-callbacks.c index 36e5375..e8f6d6e 100644 --- a/panel-plugin/xkb-callbacks.c +++ b/panel-plugin/xkb-callbacks.c @@ -74,6 +74,9 @@ xkb_plugin_button_size_allocated (GtkWidget *button, { xkb-button_hsize = allocation-width; xkb-button_vsize = allocation-height; + +DBG (size_allocated: h/v (%p: %d/%d), + xkb, xkb-button_hsize, xkb-button_vsize); } gboolean @@ -103,23 +106,33 @@ xkb_plugin_layout_image_exposed (GtkWidget *widget, cairo_t *cr; GtkStyle *style; GdkColor fgcolor; -gint actual_hsize, actual_vsize; +gint actual_hsize, actual_vsize, panel_size; +gint vsize; actual_hsize = (xkb-button_hsize xkb-hsize
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Scale layout label text to the size of the button
Updating branch refs/heads/4.10_panel_support to cb13f27b1a2b14a412a260b58a42a35c50dffc92 (commit) from 71a87726f0cbbad1df2143c7f84d885a1b6df7e9 (commit) commit cb13f27b1a2b14a412a260b58a42a35c50dffc92 Author: Igor Slepchin igor.slepc...@gmail.com Date: Mon Mar 25 16:50:53 2013 -0400 Scale layout label text to the size of the button large text size will scale to the max size that fits into the button; medium size is 0.7 of that size; small is 0.475 of the max. The default text label size is now large. (largely cherry picked from commit e0fe4255033fab3615006ca23358bfbb7dba1604) panel-plugin/xfce4-xkb-plugin.c |4 +- panel-plugin/xkb-cairo.c| 82 +++ panel-plugin/xkb-cairo.h| 16 3 files changed, 67 insertions(+), 35 deletions(-) diff --git a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c index 879346b..073fba7 100644 --- a/panel-plugin/xfce4-xkb-plugin.c +++ b/panel-plugin/xfce4-xkb-plugin.c @@ -297,7 +297,7 @@ xkb_load_config (t_xkb *xkb, const gchar *filename) xfce_rc_set_group (rcfile, NULL); xkb-display_type = xfce_rc_read_int_entry (rcfile, display_type, DISPLAY_TYPE_IMAGE); -xkb-display_textsize = xfce_rc_read_int_entry (rcfile, display_textsize, DISPLAY_TEXTSIZE_SMALL); +xkb-display_textsize = xfce_rc_read_int_entry (rcfile, display_textsize, DISPLAY_TEXTSIZE_LARGE); xkb-settings-group_policy = xfce_rc_read_int_entry (rcfile, group_policy, GROUP_POLICY_PER_APPLICATION); if (xkb-settings-group_policy != GROUP_POLICY_GLOBAL) @@ -329,7 +329,7 @@ static void xkb_load_default (t_xkb *xkb) { xkb-display_type = DISPLAY_TYPE_IMAGE; -xkb-display_textsize = DISPLAY_TEXTSIZE_SMALL; +xkb-display_textsize = DISPLAY_TEXTSIZE_LARGE; xkb-settings-group_policy = GROUP_POLICY_PER_APPLICATION; xkb-settings-default_group = 0; xkb-settings-kbd_config = NULL; diff --git a/panel-plugin/xkb-cairo.c b/panel-plugin/xkb-cairo.c index 8a3a4ef..af598a7 100644 --- a/panel-plugin/xkb-cairo.c +++ b/panel-plugin/xkb-cairo.c @@ -27,7 +27,7 @@ #include xkb-util.h #include xfce4-xkb-plugin.h -#define XKB_PREFERRED_FONT Courier New, Courier 10 Pitch, Monospace Bold %d +#define XKB_PREFERRED_FONT Courier New, Courier 10 Pitch, Monospace Bold #define xkb_cairo_arc_for_flag(cr, x, y, r, a1, a2) \ xx = layoutx + width - 12 + x; \ @@ -126,28 +126,31 @@ xkb_cairo_draw_flag (cairo_t *cr, void xkb_cairo_draw_label (cairo_t *cr, const gchar *group_name, - gint panel_size, - gint actual_width, - gint actual_height, - gint width, - gint height, - gint variant_markers_count, - gint textsize, - GdkColor fgcolor) + const gint panel_size, + const gint actual_width, + const gint actual_height, + const gint width, + const gint height, + const gint variant_markers_count, + const gint textsize, + const GdkColor fgcolor) { gchar *normalized_group_name; -gchar font_str[80]; gint pango_width, pango_height; -gint layoutx, layouty; +double layoutx, layouty, text_width, text_height; double xx, yy; +double scalex, scaley; gint i; -gint radius; +double radius, diameter; PangoLayout *layout; PangoFontDescription *desc; g_assert (cr != NULL); +DBG (actual width/height: %d/%d; markers: %d, + actual_width, actual_height, variant_markers_count); + layout = pango_cairo_create_layout (cr); normalized_group_name = xkb_util_normalize_group_name (group_name); @@ -160,40 +163,69 @@ xkb_cairo_draw_label (cairo_t *cr, } pango_layout_set_text (layout, normalized_group_name, -1); + +desc = pango_font_description_from_string ( XKB_PREFERRED_FONT ); +pango_layout_set_font_description (layout, desc); +pango_font_description_free (desc); + +gdk_cairo_set_source_color (cr, fgcolor); +pango_layout_get_pixel_size (layout, pango_width, pango_height); +DBG (pango_width/height: %d/%d, pango_width, pango_height); + switch (textsize){ case DISPLAY_TEXTSIZE_SMALL: default:/* catch misconfiguration */ -g_sprintf (font_str, XKB_PREFERRED_FONT, (int)(0.375 * panel_size) ); +scalex = scaley = 0.475; break; case DISPLAY_TEXTSIZE_MEDIUM: -g_sprintf (font_str, XKB_PREFERRED_FONT, (int)(0.600 * panel_size) ); +scalex = scaley = 0.7; break; case DISPLAY_TEXTSIZE_LARGE: -g_sprintf (font_str, XKB_PREFERRED_FONT, (int)(0.900 * panel_size
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Print debug configuration after running configure
Updating branch refs/heads/4.10_panel_support to db4b0e8915db9934d921c1ba245714ba854531cd (commit) from 34ccbcfd64c30ae3e61c1b55970c987e7cd300e1 (commit) commit db4b0e8915db9934d921c1ba245714ba854531cd Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Mar 19 20:55:06 2013 -0400 Print debug configuration after running configure Also, delete some unused and commented out lines. (cherry picked from commit 8584df77c2346abf2b89246af826c8a17f413e69) configure.in.in | 22 +- 1 files changed, 9 insertions(+), 13 deletions(-) diff --git a/configure.in.in b/configure.in.in index 0428303..7d690fd 100644 --- a/configure.in.in +++ b/configure.in.in @@ -75,19 +75,6 @@ XDT_CHECK_PACKAGE([LIBXKLAVIER], [libxklavier], [5.0]) XDT_CHECK_PACKAGE([LIBRSVG], [librsvg-2.0], [2.18]) XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-1.0], [2.12]) -dnl AC_ARG_ENABLE([debug], -dnlAC_HELP_STRING([--enable-plugin-debug], -dnl[Enable debug messages output (default=disabled)]), -dnl[ac_cv_enable_dummy_scripts=$enableval], -dnl[ac_cv_enable_dummy_scripts=no]) -dnl if test x$ac_cv_enable_dummy_scripts = xno; then -dnlXKB_DEBUG= -dnl else -dnlXKB_DEBUG=-DXKB_DEBUG -dnl fi -dnl AC_SUBST(XKB_DEBUG) - - dnl *** dnl *** Check for debugging support *** dnl *** @@ -99,3 +86,12 @@ flags/Makefile Makefile po/Makefile.in ]) + +dnl *** +dnl *** Print configuration *** +dnl *** +echo +echo Build Configuration: +echo +echo * Debug Support:$enable_debug +echo ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Remove duplicate automake options
Updating branch refs/heads/4.10_panel_support to 59fcd1d6242dd988af2eedf102a1be443aadc888 (commit) from db4b0e8915db9934d921c1ba245714ba854531cd (commit) commit 59fcd1d6242dd988af2eedf102a1be443aadc888 Author: Igor Slepchin igor.slepc...@gmail.com Date: Tue Mar 19 20:56:00 2013 -0400 Remove duplicate automake options We already set them with AM_INIT_AUTOMAKE in configure.in.in (cherry picked from commit 30e92d49efea3fc6085bde1a1dcb36097177f554) Makefile.am |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 231adb2..e3c220b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,10 +2,6 @@ SUBDIRS = panel-plugin flags po -AUTOMAKE_OPTIONS = \ - 1.8 \ - dist-bzip2 - distclean-local: rm -rf *.cache *~ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Include git revision in dev build numbers (cherry picked from commit f5528f22a936946e65218ddbc13c4834eb42df8d)
Updating branch refs/heads/4.10_panel_support to 14ba169f8ea353f674a83f982dbc2f19baa7484e (commit) from 59fcd1d6242dd988af2eedf102a1be443aadc888 (commit) commit 14ba169f8ea353f674a83f982dbc2f19baa7484e Author: Igor Slepchin igor.slepc...@gmail.com Date: Wed Mar 20 10:59:47 2013 -0400 Include git revision in dev build numbers (cherry picked from commit f5528f22a936946e65218ddbc13c4834eb42df8d) configure.in.in |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/configure.in.in b/configure.in.in index 7d690fd..b55c92b 100644 --- a/configure.in.in +++ b/configure.in.in @@ -14,7 +14,9 @@ m4_define([xkb_version_major], [0]) m4_define([xkb_version_minor], [5]) m4_define([xkb_version_micro], [4]) m4_define([xkb_version_nano], [3]) -m4_define([xkb_version], [xkb_version_major().xkb_version_minor().xkb_version_micro()ifelse(xkb_version_nano(), [], [], .[xkb_version_nano()])]) +m4_define([xkb_version_build], [@REVISION@]) +m4_define([xkb_version_tag], [git]) +m4_define([xkb_version], [xkb_version_major().xkb_version_minor().xkb_version_micro()ifelse(xkb_version_nano(), [], [], [.xkb_version_nano()])ifelse(xkb_version_tag(), [git], [xkb_version_tag()-xkb_version_build()], [xkb_version_tag()])]) dnl *** dnl *** Initialize autoconf *** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits