[gnome-flashback] shell: rename FlashbackLabelWindow to GfLabelWindow
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] shell: rename FlashbackLabelWindow to GfLabelWindow
- Date: Tue, 19 Jan 2016 13:19:34 +0000 (UTC)
commit cc82afc1ac77280a3eabb2c7b467e693d3d72230
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Tue Jan 19 14:27:01 2016 +0200
shell: rename FlashbackLabelWindow to GfLabelWindow
gnome-flashback/libshell/Makefile.am | 4 +-
.../libshell/flashback-monitor-labeler.c | 24 +++++++-------
...{flashback-label-window.c => gf-label-window.c} | 31 +++++++++----------
...{flashback-label-window.h => gf-label-window.h} | 18 ++++++------
4 files changed, 38 insertions(+), 39 deletions(-)
---
diff --git a/gnome-flashback/libshell/Makefile.am b/gnome-flashback/libshell/Makefile.am
index 4906c81..fefc534 100644
--- a/gnome-flashback/libshell/Makefile.am
+++ b/gnome-flashback/libshell/Makefile.am
@@ -17,8 +17,8 @@ libshell_la_CFLAGS = \
libshell_la_SOURCES = \
flashback-dbus-shell.c \
flashback-dbus-shell.h \
- flashback-label-window.c \
- flashback-label-window.h \
+ gf-label-window.c \
+ gf-label-window.h \
flashback-monitor-labeler.c \
flashback-monitor-labeler.h \
flashback-osd.c \
diff --git a/gnome-flashback/libshell/flashback-monitor-labeler.c
b/gnome-flashback/libshell/flashback-monitor-labeler.c
index f8e547b..c576be8 100644
--- a/gnome-flashback/libshell/flashback-monitor-labeler.c
+++ b/gnome-flashback/libshell/flashback-monitor-labeler.c
@@ -19,19 +19,19 @@
#include <gio/gio.h>
#include <libdisplay-config/flashback-monitor-manager.h>
#include "flashback-monitor-labeler.h"
-#include "flashback-label-window.h"
+#include "gf-label-window.h"
struct _FlashbackMonitorLabeler
{
- GObject parent;
+ GObject parent;
- guint watch_id;
- gchar *client;
+ guint watch_id;
+ gchar *client;
- guint hide_id;
+ guint hide_id;
- FlashbackLabelWindow **windows;
- gint n_windows;
+ GfLabelWindow **windows;
+ gint n_windows;
};
typedef struct
@@ -50,7 +50,7 @@ real_hide (FlashbackMonitorLabeler *labeler)
if (labeler->windows != NULL)
{
for (i = 0; i < labeler->n_windows; i++)
- flashback_label_window_hide (labeler->windows[i]);
+ gf_label_window_hide (labeler->windows[i]);
g_free (labeler->windows);
labeler->windows = NULL;
}
@@ -245,7 +245,7 @@ flashback_monitor_labeler_show (FlashbackMonitorLabeler *labeler,
keys = g_hash_table_get_keys (monitors);
labeler->n_windows = g_hash_table_size (monitors);
- labeler->windows = g_new0 (FlashbackLabelWindow *, labeler->n_windows);
+ labeler->windows = g_new0 (GfLabelWindow *, labeler->n_windows);
i = 0;
for (key = keys; key; key = key->next)
@@ -265,11 +265,11 @@ flashback_monitor_labeler_show (FlashbackMonitorLabeler *labeler,
g_slist_free (labels);
real_label = g_string_free (string, FALSE);
- labeler->windows[i] = flashback_label_window_new (GPOINTER_TO_INT (key->data),
- real_label);
+ labeler->windows[i] = gf_label_window_new (GPOINTER_TO_INT (key->data),
+ real_label);
g_free (real_label);
- flashback_label_window_show (labeler->windows[i]);
+ gf_label_window_show (labeler->windows[i]);
i++;
}
diff --git a/gnome-flashback/libshell/flashback-label-window.c b/gnome-flashback/libshell/gf-label-window.c
similarity index 79%
rename from gnome-flashback/libshell/flashback-label-window.c
rename to gnome-flashback/libshell/gf-label-window.c
index 84d7235..6b81527 100644
--- a/gnome-flashback/libshell/flashback-label-window.c
+++ b/gnome-flashback/libshell/gf-label-window.c
@@ -18,11 +18,11 @@
#include <config.h>
#include <math.h>
#include <gdk/gdk.h>
-#include "flashback-label-window.h"
+#include "gf-label-window.h"
#define HIDE_TIMEOUT 1500
-struct _FlashbackLabelWindow
+struct _GfLabelWindow
{
GfPopupWindow parent;
@@ -33,8 +33,7 @@ struct _FlashbackLabelWindow
GtkWidget *label;
};
-G_DEFINE_TYPE (FlashbackLabelWindow, flashback_label_window,
- GF_TYPE_POPUP_WINDOW)
+G_DEFINE_TYPE (GfLabelWindow, gf_label_window, GF_TYPE_POPUP_WINDOW)
static void
fade_finished_cb (GfPopupWindow *window)
@@ -43,11 +42,11 @@ fade_finished_cb (GfPopupWindow *window)
}
static void
-flashback_label_window_realize (GtkWidget *widget)
+gf_label_window_realize (GtkWidget *widget)
{
cairo_region_t *region;
- GTK_WIDGET_CLASS (flashback_label_window_parent_class)->realize (widget);
+ GTK_WIDGET_CLASS (gf_label_window_parent_class)->realize (widget);
region = cairo_region_create ();
gtk_widget_input_shape_combine_region (widget, region);
@@ -55,17 +54,17 @@ flashback_label_window_realize (GtkWidget *widget)
}
static void
-flashback_label_window_class_init (FlashbackLabelWindowClass *window_class)
+gf_label_window_class_init (GfLabelWindowClass *window_class)
{
GtkWidgetClass *widget_class;
widget_class = GTK_WIDGET_CLASS (window_class);
- widget_class->realize = flashback_label_window_realize;
+ widget_class->realize = gf_label_window_realize;
}
static void
-flashback_label_window_init (FlashbackLabelWindow *window)
+gf_label_window_init (GfLabelWindow *window)
{
GtkWidget *box;
@@ -84,18 +83,18 @@ flashback_label_window_init (FlashbackLabelWindow *window)
G_CALLBACK (fade_finished_cb), NULL);
}
-FlashbackLabelWindow *
-flashback_label_window_new (gint monitor,
- const gchar *label)
+GfLabelWindow *
+gf_label_window_new (gint monitor,
+ const gchar *label)
{
- FlashbackLabelWindow *window;
+ GfLabelWindow *window;
GdkScreen *screen;
gint width;
gint height;
gint size;
screen = gdk_screen_get_default ();
- window = g_object_new (FLASHBACK_TYPE_LABEL_WINDOW,
+ window = g_object_new (GF_TYPE_LABEL_WINDOW,
"type", GTK_WINDOW_POPUP,
NULL);
@@ -113,7 +112,7 @@ flashback_label_window_new (gint monitor,
}
void
-flashback_label_window_show (FlashbackLabelWindow *window)
+gf_label_window_show (GfLabelWindow *window)
{
gint width;
gint height;
@@ -143,7 +142,7 @@ flashback_label_window_show (FlashbackLabelWindow *window)
}
void
-flashback_label_window_hide (FlashbackLabelWindow *window)
+gf_label_window_hide (GfLabelWindow *window)
{
gf_popup_window_fade_start (GF_POPUP_WINDOW (window));
}
diff --git a/gnome-flashback/libshell/flashback-label-window.h b/gnome-flashback/libshell/gf-label-window.h
similarity index 56%
rename from gnome-flashback/libshell/flashback-label-window.h
rename to gnome-flashback/libshell/gf-label-window.h
index e74d76b..47f98e4 100644
--- a/gnome-flashback/libshell/flashback-label-window.h
+++ b/gnome-flashback/libshell/gf-label-window.h
@@ -15,22 +15,22 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef FLASHBACK_LABEL_WINDOW_H
-#define FLASHBACK_LABEL_WINDOW_H
+#ifndef GF_LABEL_WINDOW_H
+#define GF_LABEL_WINDOW_H
#include <libcommon/gf-popup-window.h>
G_BEGIN_DECLS
-#define FLASHBACK_TYPE_LABEL_WINDOW flashback_label_window_get_type ()
-G_DECLARE_FINAL_TYPE (FlashbackLabelWindow, flashback_label_window,
- FLASHBACK, LABEL_WINDOW, GfPopupWindow)
+#define GF_TYPE_LABEL_WINDOW gf_label_window_get_type ()
+G_DECLARE_FINAL_TYPE (GfLabelWindow, gf_label_window,
+ GF, LABEL_WINDOW, GfPopupWindow)
-FlashbackLabelWindow *flashback_label_window_new (gint monitor,
- const gchar *label);
+GfLabelWindow *gf_label_window_new (gint monitor,
+ const gchar *label);
-void flashback_label_window_show (FlashbackLabelWindow *window);
-void flashback_label_window_hide (FlashbackLabelWindow *window);
+void gf_label_window_show (GfLabelWindow *window);
+void gf_label_window_hide (GfLabelWindow *window);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]