[gnome-applets] window-buttons: fix build
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets] window-buttons: fix build
- Date: Wed, 11 Mar 2020 14:51:02 +0000 (UTC)
commit 2be0bb88b20d063b5094758a48c89c1a5f731c5a
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Wed Mar 11 16:48:55 2020 +0200
window-buttons: fix build
window-buttons/preferences.c | 11 +++++------
window-buttons/windowbuttons.c | 30 +++++++++++++++---------------
window-buttons/windowbuttons.h | 2 ++
3 files changed, 22 insertions(+), 21 deletions(-)
---
diff --git a/window-buttons/preferences.c b/window-buttons/preferences.c
index c38f81b1b..6b813d59d 100755
--- a/window-buttons/preferences.c
+++ b/window-buttons/preferences.c
@@ -20,7 +20,6 @@
#include "preferences.h"
-void updateImages(WBApplet *);
void loadThemeComboBox(GtkComboBox *, gchar *);
void loadThemeButtons(GtkWidget ***, GdkPixbuf ***, gchar ***);
void toggleCompizDecoration(gboolean);
@@ -341,7 +340,7 @@ select_new_image (GtkButton *object,
wbapplet->pixbufs = getPixbufs(wbapplet->prefs->images); // reload pixbufs from files
loadThemeButtons(getImageButtons(wbapplet->prefbuilder), wbapplet->pixbufs,
wbapplet->prefs->images); // set pref button images from pixbufs
- updateImages(wbapplet); // reload images
+ wb_applet_update_images(wbapplet); // reload images
savePreferences(wbapplet->prefs, wbapplet);
}
@@ -386,7 +385,7 @@ cb_hide_on_unmaximized (GtkButton *button,
WBApplet *wbapplet)
{
wbapplet->prefs->hide_on_unmaximized = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(button));
- updateImages(wbapplet);
+ wb_applet_update_images(wbapplet);
savePreferences(wbapplet->prefs, wbapplet);
}
@@ -421,7 +420,7 @@ cb_btn_hidden (GtkButton *button,
wbapplet->prefs->button_hidden[cbd->button_id] = 1;
}
- updateImages(wbapplet);
+ wb_applet_update_images(wbapplet);
savePreferences(wbapplet->prefs, wbapplet);
}
@@ -478,7 +477,7 @@ cb_theme_changed (GtkComboBox *combo,
wbp->images = getImages(g_strconcat(PATH_THEMES,"/",wbp->theme,"/",NULL)); // rebuild image paths
wbapplet->pixbufs = getPixbufs(wbp->images); // reload pixbufs from files
loadThemeButtons(getImageButtons(wbapplet->prefbuilder), wbapplet->pixbufs, wbp->images); // set pref
button images from pixbufs
- updateImages(wbapplet);
+ wb_applet_update_images(wbapplet);
savePreferences(wbp, wbapplet);
}
@@ -502,7 +501,7 @@ cb_orientation (GtkRadioButton *style,
wbapplet->pixbufs = getPixbufs(wbapplet->prefs->images); // reload pixbufs before rotating!
reloadButtons(wbapplet); // reload and rotate buttons
loadThemeButtons(getImageButtons(wbapplet->prefbuilder), wbapplet->pixbufs,
wbapplet->prefs->images); // set pref button images from pixbufs
- updateImages(wbapplet);
+ wb_applet_update_images(wbapplet);
savePreferences(wbapplet->prefs, wbapplet);
}
}
diff --git a/window-buttons/windowbuttons.c b/window-buttons/windowbuttons.c
index 142679260..083a4a9a8 100755
--- a/window-buttons/windowbuttons.c
+++ b/window-buttons/windowbuttons.c
@@ -252,8 +252,8 @@ getImageState (WBButtonState button_state)
}
/* Updates the images according to preferences and the umaxed window situation */
-static void
-updateImages (WBApplet *wbapplet)
+void
+wb_applet_update_images (WBApplet *wbapplet)
{
WnckWindow *controlledwindow;
gint i;
@@ -323,7 +323,7 @@ static void window_opened (WnckScreen *screen,
wbapplet->umaxedwindow = getUpperMaximized(wbapplet);
- //updateImages(wbapplet); // not required(?)
+ //wb_applet_update_images(wbapplet); // not required(?)
}
/* Triggers when a window has been closed */
@@ -334,7 +334,7 @@ static void window_closed (WnckScreen *screen,
wbapplet->umaxedwindow = getUpperMaximized(wbapplet);
- updateImages(wbapplet); //required to hide buttons when last window is closed
+ wb_applet_update_images(wbapplet); //required to hide buttons when last window is closed
}
/* Triggers when a new active window is selected */
@@ -368,7 +368,7 @@ static void active_window_changed (WnckScreen *screen,
}
}
- updateImages(wbapplet);
+ wb_applet_update_images(wbapplet);
}
}
@@ -394,7 +394,7 @@ static void active_window_state_changed (WnckWindow *window,
}
}
- updateImages(wbapplet);
+ wb_applet_update_images(wbapplet);
}
/* Triggers when umaxedwindow's state changes */
@@ -406,7 +406,7 @@ static void umaxed_window_state_changed (WnckWindow *window,
wbapplet->umaxedwindow = getUpperMaximized(wbapplet);
wbapplet->rootwindow = getRootWindow(wbapplet->activescreen);
- updateImages(wbapplet); // need to hide buttons after click if desktop is below
+ wb_applet_update_images(wbapplet); // need to hide buttons after click if desktop is below
}
/* Triggers when user changes viewports on Compiz */
@@ -420,7 +420,7 @@ static void viewports_changed (WnckScreen *screen,
wbapplet->umaxedwindow = getUpperMaximized(wbapplet);
// active_window_changed should do this too, because this one will be too sooner
- updateImages(wbapplet);
+ wb_applet_update_images(wbapplet);
}
/* Triggers when user changes workspace on Metacity (?) */
@@ -435,7 +435,7 @@ static void active_workspace_changed (WnckScreen *screen,
wbapplet->umaxedwindow = getUpperMaximized(wbapplet);
*/
- //updateImages(wbapplet);
+ //wb_applet_update_images(wbapplet);
}
/* Called when we release the click on a button */
@@ -487,7 +487,7 @@ static gboolean button_release (GtkWidget *event_box, GdkEventButton *event, WBA
}
}
- updateImages(wbapplet);
+ wb_applet_update_images(wbapplet);
return TRUE;
}
@@ -509,7 +509,7 @@ static gboolean button_press (GtkWidget *event_box,
}
}
- updateImages(wbapplet);
+ wb_applet_update_images(wbapplet);
}
return TRUE;
@@ -530,7 +530,7 @@ static gboolean hover_enter (GtkWidget *widget,
}
}
- updateImages(wbapplet);
+ wb_applet_update_images(wbapplet);
}
return TRUE;
@@ -551,7 +551,7 @@ static gboolean hover_leave (GtkWidget *widget,
}
}
- updateImages(wbapplet);
+ wb_applet_update_images(wbapplet);
}
return TRUE;
@@ -688,7 +688,7 @@ applet_change_orient (PanelApplet *panelapplet,
wbapplet->orient = orient;
wbapplet->pixbufs = getPixbufs(wbapplet->prefs->images);
reloadButtons(wbapplet);
- updateImages(wbapplet);
+ wb_applet_update_images(wbapplet);
}
}
@@ -756,7 +756,7 @@ static void init_wbapplet(PanelApplet *applet) {
gtk_widget_insert_action_group (GTK_WIDGET (wbapplet), "windowbuttons", G_ACTION_GROUP
(action_group));
toggleHidden (wbapplet); // Properly hide or show stuff
- updateImages (wbapplet);
+ wb_applet_update_images (wbapplet);
}
/* We need this because things have to be hidden after we 'show' the applet */
diff --git a/window-buttons/windowbuttons.h b/window-buttons/windowbuttons.h
index 2b1e377b0..3e3242b8f 100755
--- a/window-buttons/windowbuttons.h
+++ b/window-buttons/windowbuttons.h
@@ -199,6 +199,8 @@ typedef struct {
GType wb_applet_get_type (void);
WBApplet* wb_applet_new (void);
+void wb_applet_update_images (WBApplet *wbapplet);
+
G_END_DECLS
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]