Commit cc82afc1 authored by Alberts Muktupāvels's avatar Alberts Muktupāvels
Browse files

shell: rename FlashbackLabelWindow to GfLabelWindow

parent 0172949a
......@@ -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 \
......
......@@ -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++;
}
......
......@@ -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));
}
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment