[gnome-applets] window-title: fix build
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets] window-title: fix build
- Date: Wed, 11 Mar 2020 15:30:14 +0000 (UTC)
commit 6b7beda15ed82ecfb33b165b70c097b07a5440fd
Author: Dmitry Shachnev <mitya57 gmail com>
Date: Wed Mar 11 18:05:43 2020 +0300
window-title: fix build
window-title/preferences.c | 16 +++++++---------
window-title/windowtitle.c | 32 ++++++++++++++++----------------
window-title/windowtitle.h | 3 +++
3 files changed, 26 insertions(+), 25 deletions(-)
---
diff --git a/window-title/preferences.c b/window-title/preferences.c
index 69b226c64..b099c40b3 100755
--- a/window-title/preferences.c
+++ b/window-title/preferences.c
@@ -24,10 +24,8 @@
void cb_only_maximized (GtkButton *, WTApplet *);
void cb_click_effect (GtkButton *, WTApplet *);
void cb_hide_on_unmaximized (GtkButton *, WTApplet *);
-void updateTitle(WTApplet *);
void reloadWidgets(WTApplet *);
void toggleHidden(WTApplet *);
-void toggleExpand(WTApplet *);
void setAlignment(WTApplet *, gdouble);
void properties_close (GtkButton *, WTApplet *);
void savePreferences(WTPreferences *, WTApplet *);
@@ -169,7 +167,7 @@ void cb_only_maximized(GtkButton *button, WTApplet *wtapplet) {
void cb_hide_on_unmaximized(GtkButton *button, WTApplet *wtapplet) {
wtapplet->prefs->hide_on_unmaximized = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(button));
savePreferences(wtapplet->prefs, wtapplet);
- updateTitle(wtapplet);
+ wt_applet_update_title(wtapplet);
}
static void
@@ -205,7 +203,7 @@ cb_expand_applet (GtkButton *button,
{
wtapplet->prefs->expand_applet = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(button));
savePreferences(wtapplet->prefs, wtapplet);
- toggleExpand(wtapplet);
+ wt_applet_toggle_expand(wtapplet);
}
static void
@@ -234,7 +232,7 @@ cb_custom_style (GtkButton *button,
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));
savePreferences(wtapplet->prefs, wtapplet);
- updateTitle(wtapplet);
+ wt_applet_update_title(wtapplet);
}
static void cb_alignment_changed(GtkRange *range, WTApplet *wtapplet)
@@ -249,7 +247,7 @@ static void cb_font_active_set(GtkFontButton *widget, WTApplet *wtapplet)
//we need to copy the new font string, because we lose the pointer after prefs close
wtapplet->prefs->title_active_font = g_strdup(gtk_font_button_get_font_name(widget));
savePreferences(wtapplet->prefs, wtapplet);
- updateTitle(wtapplet);
+ wt_applet_update_title(wtapplet);
}
static void cb_font_inactive_set(GtkFontButton *widget, WTApplet *wtapplet)
@@ -257,7 +255,7 @@ static void cb_font_inactive_set(GtkFontButton *widget, WTApplet *wtapplet)
//we need to copy the new font string, because we lose the pointer after prefs close
wtapplet->prefs->title_inactive_font = g_strdup(gtk_font_button_get_font_name(widget));
savePreferences(wtapplet->prefs, wtapplet);
- updateTitle(wtapplet);
+ wt_applet_update_title(wtapplet);
}
static void cb_color_active_fg_set(GtkColorButton *widget, WTApplet *wtapplet)
@@ -267,7 +265,7 @@ static void cb_color_active_fg_set(GtkColorButton *widget, WTApplet *wtapplet)
gtk_color_button_get_color(widget, &color);
wtapplet->prefs->title_active_color = gdk_color_to_string(&color);
savePreferences(wtapplet->prefs, wtapplet);
- updateTitle(wtapplet);
+ wt_applet_update_title(wtapplet);
}
static void cb_color_inactive_fg_set(GtkColorButton *widget, gpointer user_data)
@@ -278,7 +276,7 @@ static void cb_color_inactive_fg_set(GtkColorButton *widget, gpointer user_data)
gtk_color_button_get_color(widget, &color);
wtapplet->prefs->title_inactive_color = gdk_color_to_string(&color);
savePreferences(wtapplet->prefs, wtapplet);
- updateTitle(wtapplet);
+ wt_applet_update_title(wtapplet);
}
diff --git a/window-title/windowtitle.c b/window-title/windowtitle.c
index 31f4e5439..1b4d4ab52 100755
--- a/window-title/windowtitle.c
+++ b/window-title/windowtitle.c
@@ -246,8 +246,8 @@ 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!
-static void
-updateTitle (WTApplet *wtapplet)
+void
+wt_applet_update_title (WTApplet *wtapplet)
{
WnckWindow *controlledwindow;
const char *title_text, *title_color, *title_font;
@@ -344,8 +344,8 @@ updateTitle (WTApplet *wtapplet)
}
/* Expand/unexpand applet according to preferences */
-static void
-toggleExpand (WTApplet *wtapplet)
+void
+wt_applet_toggle_expand (WTApplet *wtapplet)
{
if (wtapplet->prefs->expand_applet) {
panel_applet_set_flags (PANEL_APPLET (wtapplet), PANEL_APPLET_EXPAND_MINOR |
PANEL_APPLET_EXPAND_MAJOR);
@@ -391,7 +391,7 @@ static void applet_change_orient (PanelApplet *panelapplet,
wtapplet->orient = orient;
reloadWidgets(wtapplet);
- updateTitle(wtapplet);
+ wt_applet_update_title(wtapplet);
}
}
@@ -447,7 +447,7 @@ static void window_opened (WnckScreen *screen,
wtapplet->umaxedwindow = getUpperMaximized(wtapplet);
- updateTitle(wtapplet);
+ wt_applet_update_title(wtapplet);
}
/* Triggers when a window has been closed */
@@ -458,7 +458,7 @@ static void window_closed (WnckScreen *screen,
wtapplet->umaxedwindow = getUpperMaximized(wtapplet);
- updateTitle(wtapplet); // required when closing window in the background
+ wt_applet_update_title(wtapplet); // required when closing window in the background
}
/* Triggers when a new active window is selected */
@@ -487,7 +487,7 @@ static void active_window_changed (WnckScreen *screen,
wtapplet->focused = TRUE;
- updateTitle(wtapplet);
+ wt_applet_update_title(wtapplet);
}
}
@@ -508,12 +508,12 @@ static void active_window_state_changed (WnckWindow *window,
}
}
- updateTitle(wtapplet);
+ wt_applet_update_title(wtapplet);
}
/* Triggers when activewindow's name changes */
static void active_window_nameicon_changed (WnckWindow *window, WTApplet *wtapplet) {
- updateTitle(wtapplet);
+ wt_applet_update_title(wtapplet);
}
/* Triggers when umaxedwindow's state changes */
@@ -525,12 +525,12 @@ static void umaxed_window_state_changed (WnckWindow *window,
wtapplet->umaxedwindow = getUpperMaximized(wtapplet);
wtapplet->rootwindow = getRootWindow(wtapplet->activescreen);
- updateTitle(wtapplet);
+ wt_applet_update_title(wtapplet);
}
/* Triggers when umaxedwindow's name OR ICON changes */
static void umaxed_window_nameicon_changed(WnckWindow *window, WTApplet *wtapplet) {
- updateTitle(wtapplet);
+ wt_applet_update_title(wtapplet);
}
/* Triggers when user changes viewports (Compiz) */
@@ -543,7 +543,7 @@ static void viewports_changed (WnckScreen *screen,
wtapplet->umaxedwindow = getUpperMaximized(wtapplet);
// active_window_changed will do it too, but this one will be sooner
- updateTitle(wtapplet);
+ wt_applet_update_title(wtapplet);
}
/* Triggers when.... ? not sure... (Metacity?) */
@@ -557,7 +557,7 @@ static void active_workspace_changed (WnckScreen *screen,
// wtapplet->rootwindow = getRootWindow(wtapplet->activescreen); //?
wtapplet->umaxedwindow = getUpperMaximized(wtapplet);
- updateTitle(wtapplet);
+ wt_applet_update_title(wtapplet);
*/
}
@@ -790,9 +790,9 @@ static void init_wtapplet (PanelApplet *applet) {
panel_applet_setup_menu (applet, windowtitle_menu_items, action_group, GETTEXT_PACKAGE);
gtk_widget_insert_action_group (GTK_WIDGET (wtapplet), "windowtitle", G_ACTION_GROUP (action_group));
- toggleExpand (wtapplet);
+ wt_applet_toggle_expand (wtapplet);
toggleHidden (wtapplet); // Properly hide or show stuff
- updateTitle (wtapplet);
+ wt_applet_update_title (wtapplet);
}
// Initial function that draws the applet
diff --git a/window-title/windowtitle.h b/window-title/windowtitle.h
index 4d0df059a..7759de5fd 100755
--- a/window-title/windowtitle.h
+++ b/window-title/windowtitle.h
@@ -150,5 +150,8 @@ typedef struct {
GType wt_applet_get_type (void);
WTApplet* wt_applet_new (void);
+void wt_applet_update_title (WTApplet *wtapplet);
+void wt_applet_toggle_expand (WTApplet *wtapplet);
+
G_END_DECLS
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]