[gnome-applets] window-title: fix -Wmissing-prototypes warnings



commit f4805e26ce26e888ce10a6fc9dcd2c4b466c4688
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Tue Mar 10 16:55:15 2020 +0200

    window-title: fix -Wmissing-prototypes warnings

 window-title/preferences.c | 41 +++++++++++++++++++++++++++++++++--------
 window-title/preferences.h |  4 ++++
 window-title/windowtitle.c |  9 +++++----
 3 files changed, 42 insertions(+), 12 deletions(-)
---
diff --git a/window-title/preferences.c b/window-title/preferences.c
index d862f1ec5..69b226c64 100755
--- a/window-title/preferences.c
+++ b/window-title/preferences.c
@@ -172,43 +172,64 @@ void cb_hide_on_unmaximized(GtkButton *button, WTApplet *wtapplet) {
        updateTitle(wtapplet);
 }
 
-void cb_hide_icon(GtkButton *button, WTApplet *wtapplet) {
+static void
+cb_hide_icon (GtkButton *button,
+              WTApplet  *wtapplet)
+{
        wtapplet->prefs->hide_icon = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(button));
        savePreferences(wtapplet->prefs, wtapplet);
        toggleHidden (wtapplet);
 }
 
-void cb_hide_title(GtkButton *button, WTApplet *wtapplet) {
+static void
+cb_hide_title (GtkButton *button,
+               WTApplet  *wtapplet)
+{
        wtapplet->prefs->hide_title = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(button));
        savePreferences(wtapplet->prefs, wtapplet);
        toggleHidden(wtapplet);
 }
 
-void cb_swap_order(GtkButton *button, WTApplet *wtapplet) {
+static void
+cb_swap_order (GtkButton *button,
+               WTApplet  *wtapplet)
+{
        wtapplet->prefs->swap_order = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(button));
        savePreferences(wtapplet->prefs, wtapplet);
        reloadWidgets(wtapplet);
 }
 
-void cb_expand_applet(GtkButton *button, WTApplet *wtapplet) {
+static void
+cb_expand_applet (GtkButton *button,
+                  WTApplet  *wtapplet)
+{
        wtapplet->prefs->expand_applet = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(button));
        savePreferences(wtapplet->prefs, wtapplet);
        toggleExpand(wtapplet);
 }
 
-void cb_show_window_menu(GtkButton *button, WTApplet *wtapplet) {
+static void
+cb_show_window_menu (GtkButton *button,
+                     WTApplet  *wtapplet)
+{
        wtapplet->prefs->show_window_menu = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(button));
        savePreferences(wtapplet->prefs, wtapplet);
 }
 
-void cb_show_tooltips(GtkButton *button, WTApplet *wtapplet) {
+static void
+cb_show_tooltips (GtkButton *button,
+                  WTApplet  *wtapplet)
+{
        wtapplet->prefs->show_tooltips = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(button));
        gtk_widget_set_has_tooltip (GTK_WIDGET(wtapplet->icon), wtapplet->prefs->show_tooltips);
        gtk_widget_set_has_tooltip (GTK_WIDGET(wtapplet->title), wtapplet->prefs->show_tooltips);
        savePreferences(wtapplet->prefs, wtapplet);
 }
 
-void cb_custom_style(GtkButton *button, WTApplet *wtapplet) {
+static void
+cb_custom_style (GtkButton *button,
+                 WTApplet  *wtapplet)
+{
        GtkTable *parent = GTK_TABLE(gtk_builder_get_object(wtapplet->prefbuilder, "table_custom_style"));
        gtk_widget_set_sensitive(GTK_WIDGET(parent), gtk_toggle_button_get_active 
(GTK_TOGGLE_BUTTON(button)));
        wtapplet->prefs->custom_style = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(button));
@@ -262,7 +283,11 @@ static void cb_color_inactive_fg_set(GtkColorButton *widget, gpointer user_data)
 
 
 /* The Preferences Dialog */
-void properties_cb (GSimpleAction *action, GVariant *parameter, gpointer user_data) {
+void
+wt_applet_properties_cb (GSimpleAction *action,
+                         GVariant      *parameter,
+                         gpointer       user_data)
+{
        WTApplet *wtapplet;
        GdkColor btn_color_color;
 
diff --git a/window-title/preferences.h b/window-title/preferences.h
index b49bc68d1..151bdd36b 100644
--- a/window-title/preferences.h
+++ b/window-title/preferences.h
@@ -19,3 +19,7 @@
  */
 
 #include "windowtitle.h"
+
+void wt_applet_properties_cb (GSimpleAction *action,
+                              GVariant      *parameter,
+                              gpointer       user_data);
diff --git a/window-title/windowtitle.c b/window-title/windowtitle.c
index 6f51e1869..6b4c26580 100755
--- a/window-title/windowtitle.c
+++ b/window-title/windowtitle.c
@@ -19,6 +19,7 @@
  */
 
 #include "windowtitle.h"
+#include "preferences.h"
 
 /* Prototypes */
 static void applet_change_orient (PanelApplet *, PanelAppletOrient, WTApplet *);
@@ -35,8 +36,6 @@ static void about_cb ( GSimpleAction *, GVariant *, gpointer );
 static WnckWindow *getRootWindow (WnckScreen *);
 static WnckWindow *getUpperMaximized (WTApplet *);
 //const gchar *getCheckBoxGConfKey (gushort);
-//void properties_cb (BonoboUIComponent *, WTApplet *, const char *);
-void properties_cb ( GSimpleAction *, GVariant *, gpointer );
 void setAlignment(WTApplet *, gdouble);
 void placeWidgets (WTApplet *);
 void reloadWidgets (WTApplet *);
@@ -48,7 +47,7 @@ WTPreferences *loadPreferences(WTApplet *);
 G_DEFINE_TYPE (WTApplet, wt_applet, PANEL_TYPE_APPLET);
 
 static GActionEntry windowtitle_menu_actions [] = {
-       { "preferences", properties_cb,  NULL, NULL, NULL },
+       { "preferences", wt_applet_properties_cb,  NULL, NULL, NULL },
        { "about",       about_cb, NULL, NULL, NULL }
 };
 
@@ -225,7 +224,9 @@ static WnckWindow *getUpperMaximized (WTApplet *wtapplet) {
 
 // Updates the images according to preferences and the window situation
 // Warning! This function is called very often, so it should only do the most necessary things!
-void updateTitle(WTApplet *wtapplet) {
+static void
+updateTitle (WTApplet *wtapplet)
+{
        WnckWindow *controlledwindow;
        gchar *title_text, *title_color, *title_font;
        GdkPixbuf *icon_pixbuf;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]