summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2010-10-29 07:49:37 +0000
committerJon A. Cruz <jon@joncruz.org>2010-10-29 07:49:37 +0000
commit43910107bd13f3968d48d955a81bb787942af865 (patch)
treed98d7b446956fcae14f66779d5fa2a97466a4f0c /src/widgets
parentLPE Knot: only consider closing line segment if its length is non-zero (diff)
downloadinkscape-43910107bd13f3968d48d955a81bb787942af865.tar.gz
inkscape-43910107bd13f3968d48d955a81bb787942af865.zip
Cleanups from backports.
(bzr r9863)
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/button.cpp42
-rw-r--r--src/widgets/toolbox.cpp4
2 files changed, 22 insertions, 24 deletions
diff --git a/src/widgets/button.cpp b/src/widgets/button.cpp
index aa32a9d91..dc830d096 100644
--- a/src/widgets/button.cpp
+++ b/src/widgets/button.cpp
@@ -288,29 +288,27 @@ sp_button_action_set_shortcut (SPAction *action, unsigned int /*shortcut*/, void
}
}
-static void
-sp_button_set_composed_tooltip (GtkTooltips *tooltips, GtkWidget *widget, SPAction *action)
+static void sp_button_set_composed_tooltip(GtkTooltips *tooltips, GtkWidget *widget, SPAction *action)
{
- if (action) {
- unsigned int shortcut = sp_shortcut_get_primary (action->verb);
- if (shortcut!=GDK_VoidSymbol) {
- // there's both action and shortcut
-
- gchar* key = sp_shortcut_get_label(shortcut);
-
- gchar *tip = g_strdup_printf ("%s (%s)", action->tip, key);
- gtk_tooltips_set_tip (tooltips, widget, tip, NULL);
- g_free (tip);
- g_free (key);
-
- } else {
- // action has no shortcut
- gtk_tooltips_set_tip (tooltips, widget, action->tip, NULL);
- }
- } else {
- // no action
- gtk_tooltips_set_tip (tooltips, widget, NULL, NULL);
- }
+ if (action) {
+ unsigned int shortcut = sp_shortcut_get_primary (action->verb);
+ if (shortcut != GDK_VoidSymbol) {
+ // there's both action and shortcut
+
+ gchar *key = sp_shortcut_get_label(shortcut);
+
+ gchar *tip = g_strdup_printf ("%s (%s)", action->tip, key);
+ gtk_tooltips_set_tip(tooltips, widget, tip, NULL);
+ g_free(tip);
+ g_free(key);
+ } else {
+ // action has no shortcut
+ gtk_tooltips_set_tip(tooltips, widget, action->tip, NULL);
+ }
+ } else {
+ // no action
+ gtk_tooltips_set_tip(tooltips, widget, NULL, NULL);
+ }
}
GtkWidget *
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index f6af1ca55..f7c493915 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -827,8 +827,8 @@ GtkWidget * sp_toolbox_button_new_from_verb_with_doubleclick(GtkWidget *t, Inksc
unsigned int shortcut = sp_shortcut_get_primary(verb);
- if (shortcut!=GDK_VoidSymbol) {
- gchar* key = sp_shortcut_get_label(shortcut);
+ if (shortcut != GDK_VoidSymbol) {
+ gchar *key = sp_shortcut_get_label(shortcut);
gchar *tip = g_strdup_printf ("%s (%s)", action->tip, key);
if ( t ) {
gtk_toolbar_append_widget( GTK_TOOLBAR(t), b, tip, 0 );