[gnome-applets/wip/muktupavels/geyes] geyes: port to libgnome-panel
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets/wip/muktupavels/geyes] geyes: port to libgnome-panel
- Date: Mon, 30 Mar 2020 21:21:32 +0000 (UTC)
commit 3fc86e5824869842e75f0517770cc4e1ffc29124
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Tue Mar 31 00:17:48 2020 +0300
geyes: port to libgnome-panel
Makefile.am | 2 -
configure.ac | 6 +-
geyes/Makefile.am | 29 ---
geyes/geyes-applet-menu.xml | 14 --
...rg.gnome.applets.GeyesApplet.panel-applet.in.in | 15 --
gnome-applets/Makefile.am | 3 +
gnome-applets/ga-module.c | 11 ++
{geyes/src => gnome-applets/geyes}/Makefile.am | 20 +--
gnome-applets/geyes/geyes-applet-menu.xml | 18 ++
.../geyes/geyes-applet-private.h | 18 +-
.../geyes.c => gnome-applets/geyes/geyes-applet.c | 194 +++++++++------------
gnome-applets/geyes/geyes-applet.h | 30 ++++
{geyes/src => gnome-applets/geyes}/themes.c | 15 +-
.../geyes}/themes/Bizarre/Bizarre-eye.png | Bin
.../geyes}/themes/Bizarre/Bizarre-pupil.png | Bin
.../geyes}/themes/Bizarre/config | 0
.../geyes}/themes/Bloodshot/Bloodshot-eye.png | Bin
.../geyes}/themes/Bloodshot/Bloodshot-pupil.png | Bin
.../geyes}/themes/Bloodshot/config | 0
.../geyes}/themes/Brown-EyedGirl/brown-eye.png | Bin
.../geyes}/themes/Brown-EyedGirl/brown-pupil.png | Bin
.../geyes}/themes/Brown-EyedGirl/config | 0
.../themes/Default-tiny/Default-tiny-eye.png | Bin
.../themes/Default-tiny/Default-tiny-pupil.png | Bin
.../geyes}/themes/Default-tiny/config | 0
.../geyes}/themes/Default/Default-eye.png | Bin
.../geyes}/themes/Default/Default-pupil.png | Bin
.../geyes}/themes/Default/config | 0
.../geyes}/themes/EyelashLarge/config | 0
.../geyes}/themes/EyelashLarge/eye.png | Bin
.../geyes}/themes/EyelashLarge/pupil.png | Bin
.../geyes}/themes/Green-EyedGirl/config | 0
.../geyes}/themes/Green-EyedGirl/green-eye.png | Bin
.../geyes}/themes/Green-EyedGirl/green-pupil.png | Bin
.../geyes}/themes/Horrid/config | 0
.../geyes}/themes/Horrid/horrid_eye.png | Bin
.../geyes}/themes/Horrid/horrid_pupil.png | Bin
{geyes => gnome-applets/geyes}/themes/Makefile.am | 0
.../geyes}/themes/Pink-EyedGirl/config | 0
.../geyes}/themes/Pink-EyedGirl/pink-eye.png | Bin
.../geyes}/themes/Pink-EyedGirl/pink-pupil.png | Bin
.../geyes}/themes/PumpkinMonster/config | 0
.../geyes}/themes/PumpkinMonster/eye.png | Bin
.../geyes}/themes/PumpkinMonster/pupil.png | Bin
{geyes => gnome-applets/geyes}/themes/Tango/config | 0
.../geyes}/themes/Tango/tango-eye.png | Bin
.../geyes}/themes/Tango/tango-pupil.png | Bin
po/POTFILES.in | 7 +-
po/POTFILES.skip | 1 -
49 files changed, 174 insertions(+), 209 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 48ec6e587..10a4585af 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,7 +5,6 @@ tracker_search_bar_SUBDIR = tracker-search-bar
endif
always_built_SUBDIRS = \
- geyes \
mini-commander \
multiload \
sticky-notes \
@@ -26,7 +25,6 @@ DIST_SUBDIRS = \
gnome-applets \
help \
po \
- geyes \
mini-commander \
multiload \
sticky-notes \
diff --git a/configure.ac b/configure.ac
index 9d4d979fb..de7200d4f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -347,6 +347,8 @@ AC_CONFIG_FILES([
gnome-applets/cpufreq/Makefile
gnome-applets/cpufreq/cpufreq-selector/Makefile
gnome-applets/drivemount/Makefile
+ gnome-applets/geyes/Makefile
+ gnome-applets/geyes/themes/Makefile
gnome-applets/gweather/Makefile
gnome-applets/inhibit/Makefile
gnome-applets/netspeed/Makefile
@@ -371,10 +373,6 @@ AC_CONFIG_FILES([
po/Makefile.in
- geyes/Makefile
- geyes/src/Makefile
- geyes/themes/Makefile
-
mini-commander/Makefile
mini-commander/src/Makefile
diff --git a/gnome-applets/Makefile.am b/gnome-applets/Makefile.am
index b653214c4..14c20ac64 100644
--- a/gnome-applets/Makefile.am
+++ b/gnome-applets/Makefile.am
@@ -8,6 +8,7 @@ SUBDIRS = \
command \
cpufreq \
drivemount \
+ geyes \
gweather \
inhibit \
netspeed \
@@ -45,6 +46,7 @@ org_gnome_gnome_applets_la_LIBADD = \
$(top_builddir)/gnome-applets/charpick/libcharacter-picker-applet.la \
$(top_builddir)/gnome-applets/command/libcommand-applet.la \
$(top_builddir)/gnome-applets/drivemount/libdrive-mount-applet.la \
+ $(top_builddir)/gnome-applets/geyes/libgeyes-applet.la \
$(top_builddir)/gnome-applets/gweather/libgweather-applet.la \
$(top_builddir)/gnome-applets/inhibit/libinhibit-applet.la \
$(top_builddir)/gnome-applets/netspeed/libnet-speed-applet.la \
@@ -127,6 +129,7 @@ ui_files = \
charpick/charpick-applet-menu.xml \
command/command-applet-menu.xml \
drivemount/drivemount-applet-menu.xml \
+ geyes/geyes-applet-menu.xml \
gweather/gweather-applet-menu.xml \
inhibit/inhibit-applet-menu.xml \
netspeed/netspeed-menu.xml \
diff --git a/gnome-applets/ga-module.c b/gnome-applets/ga-module.c
index 7dffddbdb..b2971ea8e 100644
--- a/gnome-applets/ga-module.c
+++ b/gnome-applets/ga-module.c
@@ -30,6 +30,7 @@
#include "cpufreq/cpufreq-applet.h"
#endif
#include "drivemount/drivemount-applet.h"
+#include "geyes/geyes-applet.h"
#include "gweather/gweather-applet.h"
#include "inhibit/inhibit-applet.h"
#include "netspeed/netspeed-applet.h"
@@ -98,6 +99,13 @@ ga_get_applet_info (const char *id)
description = _("Mount local disks and devices");
icon_name = "media-floppy";
}
+ else if (g_strcmp0 (id, "geyes") == 0)
+ {
+ type_func = eyes_applet_get_type;
+ name = _("Eyes");
+ description = _("A set of eyeballs for your panel");
+ icon_name = "gnome-eyes-applet";
+ }
else if (g_strcmp0 (id, "gweather") == 0)
{
type_func = gweather_applet_get_type;
@@ -177,6 +185,8 @@ ga_get_applet_id_from_iid (const char *iid)
#endif
else if (g_strcmp0 (iid, "DriveMountAppletFactory::DriveMountApplet") == 0)
return "drivemount";
+ else if (g_strcmp0 (iid, "GeyesAppletFactory::GeyesApplet") == 0)
+ return "geyes";
else if (g_strcmp0 (iid, "GWeatherAppletFactory::GWeatherApplet") == 0)
return "gweather";
else if (g_strcmp0 (iid, "InhibitAppletFactory::InhibitApplet") == 0)
@@ -218,6 +228,7 @@ gp_module_load (GpModule *module)
"cpufreq",
#endif
"drivemount",
+ "geyes",
"gweather",
"inhibit",
"netspeed",
diff --git a/geyes/src/Makefile.am b/gnome-applets/geyes/Makefile.am
similarity index 59%
rename from geyes/src/Makefile.am
rename to gnome-applets/geyes/Makefile.am
index f2afb4fd8..c46a8f5a7 100644
--- a/geyes/src/Makefile.am
+++ b/gnome-applets/geyes/Makefile.am
@@ -1,41 +1,35 @@
NULL =
-uidir = $(pkgdatadir)/ui
+SUBDIRS = themes
-geyes_appletlibdir = $(pkglibdir)
-geyes_appletlib_LTLIBRARIES = libgeyes-applet.la
+noinst_LTLIBRARIES = libgeyes-applet.la
libgeyes_applet_la_CPPFLAGS = \
- -I. \
- -I$(srcdir) \
- -I$(includedir) \
-DGEYES_THEMES_DIR=\""$(pkgdatadir)/geyes/"\" \
- -DGEYES_MENU_UI_DIR=\""$(uidir)"\" \
- -DGNOMELOCALEDIR=\""$(localedir)"\" \
-DG_LOG_DOMAIN=\"org.gnome.gnome-applets.geyes\" \
-DG_LOG_USE_STRUCTURED=1 \
$(NULL)
libgeyes_applet_la_CFLAGS = \
- $(GNOME_APPLETS_CFLAGS) \
+ $(GNOME_PANEL_CFLAGS) \
$(WARN_CFLAGS) \
$(AM_CFLAGS) \
$(NULL)
libgeyes_applet_la_SOURCES = \
- geyes.c \
- geyes.h \
+ geyes-applet-private.h \
+ geyes-applet.c \
+ geyes-applet.h \
themes.c \
$(NULL)
libgeyes_applet_la_LDFLAGS = \
- -avoid-version \
$(WARN_LDFLAGS) \
$(AM_LDFLAGS) \
$(NULL)
libgeyes_applet_la_LIBADD = \
- $(GNOME_APPLETS_LIBS)\
+ $(GNOME_PANEL_LIBS)\
$(LIBM) \
$(NULL)
diff --git a/gnome-applets/geyes/geyes-applet-menu.xml b/gnome-applets/geyes/geyes-applet-menu.xml
new file mode 100644
index 000000000..eb6ef29ca
--- /dev/null
+++ b/gnome-applets/geyes/geyes-applet-menu.xml
@@ -0,0 +1,18 @@
+<interface>
+ <menu id="geyes-menu">
+ <section>
+ <item>
+ <attribute name="label" translatable="yes">_Preferences</attribute>
+ <attribute name="action">geyes.preferences</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">_Help</attribute>
+ <attribute name="action">geyes.help</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">_About</attribute>
+ <attribute name="action">geyes.about</attribute>
+ </item>
+ </section>
+ </menu>
+</interface>
diff --git a/geyes/src/geyes.h b/gnome-applets/geyes/geyes-applet-private.h
similarity index 90%
rename from geyes/src/geyes.h
rename to gnome-applets/geyes/geyes-applet-private.h
index 6e27dfd4e..5fff2c7eb 100644
--- a/geyes/src/geyes.h
+++ b/gnome-applets/geyes/geyes-applet-private.h
@@ -16,14 +16,12 @@
*
*/
-#ifndef __GEYES_H__
-#define __GEYES_H__
+#ifndef GEYES_APPLET_PRIVATE_H
+#define GEYES_APPLET_PRIVATE_H
+
+#include "geyes-applet.h"
-#include <glib.h>
-#include <glib/gi18n.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <gtk/gtk.h>
-#include <panel-applet.h>
#define GEYES_PREFS_SCHEMA "org.gnome.gnome-applets.geyes"
#define KEY_THEME_PATH "theme-path"
@@ -36,10 +34,10 @@ typedef struct
gint selected_row;
} EyesPropertyBox;
-typedef struct
+struct _EyesApplet
{
- /* Applet */
- PanelApplet *applet;
+ GpApplet parent;
+
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget **eyes;
@@ -65,7 +63,7 @@ typedef struct
EyesPropertyBox prop_box;
GSettings *settings;
-} EyesApplet;
+};
/* eyes.c */
void setup_eyes (EyesApplet *eyes_applet);
diff --git a/geyes/src/geyes.c b/gnome-applets/geyes/geyes-applet.c
similarity index 73%
rename from geyes/src/geyes.c
rename to gnome-applets/geyes/geyes-applet.c
index f0149c5dd..bb1ff713b 100644
--- a/geyes/src/geyes.c
+++ b/gnome-applets/geyes/geyes-applet.c
@@ -1,5 +1,4 @@
-/* -*- Mode: C++; c-basic-offset: 8 -*-
- * geyes.c - A cheap xeyes ripoff.
+/*
* Copyright (C) 1999 Dave Camp
*
* This program is free software; you can redistribute it and/or modify
@@ -16,14 +15,19 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <config.h>
+#include "config.h"
+#include "geyes-applet.h"
+
#include <math.h>
#include <stdlib.h>
-#include <panel-applet.h>
-#include "geyes.h"
+#include <glib/gi18n-lib.h>
+
+#include "geyes-applet-private.h"
#define UPDATE_TIMEOUT 100
+G_DEFINE_TYPE (EyesApplet, eyes_applet, GP_TYPE_APPLET)
+
static gfloat
gtk_align_to_gfloat (GtkAlign align)
{
@@ -129,7 +133,7 @@ timer_cb (EyesApplet *eyes_applet)
gint pupil_x, pupil_y;
gint i;
- display = gtk_widget_get_display (GTK_WIDGET (eyes_applet->applet));
+ display = gtk_widget_get_display (GTK_WIDGET (eyes_applet));
device_manager = gdk_display_get_device_manager (display);
device = gdk_device_manager_get_client_pointer (device_manager);
@@ -262,56 +266,6 @@ destroy_eyes (EyesApplet *eyes_applet)
g_free (eyes_applet->pointer_last_y);
}
-static EyesApplet *
-create_eyes (PanelApplet *applet)
-{
- EyesApplet *eyes_applet = g_new0 (EyesApplet, 1);
-
- eyes_applet->applet = applet;
- eyes_applet->vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
-
- gtk_container_add (GTK_CONTAINER (applet), eyes_applet->vbox);
-
- return eyes_applet;
-}
-
-static void
-destroy_cb (GtkWidget *object, EyesApplet *eyes_applet)
-{
- g_return_if_fail (eyes_applet);
-
- g_source_remove (eyes_applet->timeout_id);
- if (eyes_applet->hbox)
- destroy_eyes (eyes_applet);
- eyes_applet->timeout_id = 0;
- if (eyes_applet->eye_image)
- g_object_unref (eyes_applet->eye_image);
- eyes_applet->eye_image = NULL;
- if (eyes_applet->pupil_image)
- g_object_unref (eyes_applet->pupil_image);
- eyes_applet->pupil_image = NULL;
- if (eyes_applet->theme_dir)
- g_free (eyes_applet->theme_dir);
- eyes_applet->theme_dir = NULL;
- if (eyes_applet->theme_name)
- g_free (eyes_applet->theme_name);
- eyes_applet->theme_name = NULL;
- if (eyes_applet->eye_filename)
- g_free (eyes_applet->eye_filename);
- eyes_applet->eye_filename = NULL;
- if (eyes_applet->pupil_filename)
- g_free (eyes_applet->pupil_filename);
- eyes_applet->pupil_filename = NULL;
-
- if (eyes_applet->prop_box.pbox)
- gtk_widget_destroy (eyes_applet->prop_box.pbox);
-
- if (eyes_applet->settings)
- g_object_unref (eyes_applet->settings);
-
- g_free (eyes_applet);
-}
-
static void
help_cb (GSimpleAction *action,
GVariant *parameter,
@@ -320,7 +274,7 @@ help_cb (GSimpleAction *action,
EyesApplet *eyes_applet = (EyesApplet *) user_data;
GError *error = NULL;
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (eyes_applet->applet)),
+ gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (eyes_applet)),
"help:geyes",
gtk_get_current_event_time (),
&error);
@@ -330,7 +284,7 @@ help_cb (GSimpleAction *action,
_("There was an error displaying help: %s"),
error->message);
g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (gtk_widget_destroy), NULL);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
- gtk_window_set_screen (GTK_WINDOW (dialog), gtk_widget_get_screen (GTK_WIDGET
(eyes_applet->applet)));
+ gtk_window_set_screen (GTK_WINDOW (dialog), gtk_widget_get_screen (GTK_WIDGET (eyes_applet)));
gtk_widget_show (dialog);
g_error_free (error);
error = NULL;
@@ -340,7 +294,8 @@ help_cb (GSimpleAction *action,
static const GActionEntry geyes_applet_menu_actions [] = {
{ "preferences", properties_cb, NULL, NULL, NULL },
{ "help", help_cb, NULL, NULL, NULL },
- { "about", about_cb, NULL, NULL, NULL }
+ { "about", about_cb, NULL, NULL, NULL },
+ { NULL }
};
static void
@@ -358,83 +313,102 @@ set_atk_name_description (GtkWidget *widget, const gchar *name,
atk_object_set_description (aobj, description);
}
-static gboolean
-geyes_applet_fill (PanelApplet *applet)
+static void
+eyes_applet_fill (EyesApplet *eyes_applet)
{
- EyesApplet *eyes_applet;
- GSimpleActionGroup *action_group;
+ const char *menu_resource;
GAction *action;
- gchar *ui_path;
- panel_applet_set_flags (applet, PANEL_APPLET_EXPAND_MINOR);
-
- eyes_applet = create_eyes (applet);
+ eyes_applet->vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+ gtk_container_add (GTK_CONTAINER (eyes_applet), eyes_applet->vbox);
- eyes_applet->settings = panel_applet_settings_new (applet, GEYES_PREFS_SCHEMA);
+ eyes_applet->settings = gp_applet_settings_new (GP_APPLET (eyes_applet), GEYES_PREFS_SCHEMA);
eyes_applet->timeout_id = g_timeout_add (
UPDATE_TIMEOUT, (GSourceFunc) timer_cb, eyes_applet);
- action_group = g_simple_action_group_new ();
- g_action_map_add_action_entries (G_ACTION_MAP (action_group),
- geyes_applet_menu_actions,
- G_N_ELEMENTS (geyes_applet_menu_actions),
- eyes_applet);
- ui_path = g_build_filename (GEYES_MENU_UI_DIR, "geyes-applet-menu.xml", NULL);
- panel_applet_setup_menu_from_file (eyes_applet->applet,
- ui_path, action_group,
- GETTEXT_PACKAGE);
- g_free (ui_path);
-
- gtk_widget_insert_action_group (GTK_WIDGET (applet), "geyes",
- G_ACTION_GROUP (action_group));
-
- action = g_action_map_lookup_action (G_ACTION_MAP (action_group), "preferences");
- g_object_bind_property (applet, "locked-down",
+ menu_resource = GRESOURCE_PREFIX "/ui/geyes-applet-menu.xml";
+ gp_applet_setup_menu_from_resource (GP_APPLET (eyes_applet),
+ menu_resource,
+ geyes_applet_menu_actions);
+
+ action = gp_applet_menu_lookup_action (GP_APPLET (eyes_applet), "preferences");
+ g_object_bind_property (eyes_applet, "locked-down",
action, "enabled",
G_BINDING_DEFAULT|G_BINDING_INVERT_BOOLEAN|G_BINDING_SYNC_CREATE);
- g_object_unref (action_group);
-
- gtk_widget_set_tooltip_text (GTK_WIDGET (eyes_applet->applet), _("Eyes"));
+ gtk_widget_set_tooltip_text (GTK_WIDGET (eyes_applet), _("Eyes"));
- set_atk_name_description (GTK_WIDGET (eyes_applet->applet), _("Eyes"),
+ set_atk_name_description (GTK_WIDGET (eyes_applet), _("Eyes"),
_("The eyes look in the direction of the mouse pointer"));
- g_signal_connect (eyes_applet->vbox,
- "destroy",
- G_CALLBACK (destroy_cb),
- eyes_applet);
-
- gtk_widget_show_all (GTK_WIDGET (eyes_applet->applet));
+ gtk_widget_show_all (GTK_WIDGET (eyes_applet));
/* setup here and not in create eyes so the destroy signal is set so
* that when there is an error within loading the theme
* we can emit this signal */
- if (properties_load (eyes_applet) == FALSE)
- return FALSE;
+ if (!properties_load (eyes_applet))
+ return;
setup_eyes (eyes_applet);
+}
- return TRUE;
+static void
+eyes_applet_constructed (GObject *object)
+{
+ G_OBJECT_CLASS (eyes_applet_parent_class)->constructed (object);
+ eyes_applet_fill (EYES_APPLET (object));
}
-static gboolean
-geyes_applet_factory (PanelApplet *applet,
- const gchar *iid,
- gpointer data)
+static void
+eyes_applet_dispose (GObject *object)
{
- gboolean retval = FALSE;
+ EyesApplet *self;
+
+ self = EYES_APPLET (object);
+
+ if (self->timeout_id != 0)
+ {
+ g_source_remove (self->timeout_id);
+ self->timeout_id = 0;
+ }
+
+ if (self->hbox != NULL)
+ {
+ destroy_eyes (self);
+ self->hbox = NULL;
+ }
+
+ g_clear_object (&self->eye_image);
+ g_clear_object (&self->pupil_image);
+
+ g_clear_pointer (&self->theme_dir, g_free);
+ g_clear_pointer (&self->theme_name, g_free);
+ g_clear_pointer (&self->eye_filename, g_free);
+ g_clear_pointer (&self->pupil_filename, g_free);
- theme_dirs_create ();
+ g_clear_pointer (&self->prop_box.pbox, gtk_widget_destroy);
- if (!strcmp (iid, "GeyesApplet"))
- retval = geyes_applet_fill (applet);
+ g_clear_object (&self->settings);
- return retval;
+ G_OBJECT_CLASS (eyes_applet_parent_class)->dispose (object);
}
-PANEL_APPLET_IN_PROCESS_FACTORY ("GeyesAppletFactory",
- PANEL_TYPE_APPLET,
- geyes_applet_factory,
- NULL)
+static void
+eyes_applet_class_init (EyesAppletClass *self_class)
+{
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (self_class);
+
+ object_class->constructed = eyes_applet_constructed;
+ object_class->dispose = eyes_applet_dispose;
+}
+
+static void
+eyes_applet_init (EyesApplet *self)
+{
+ gp_applet_set_flags (GP_APPLET (self), GP_APPLET_FLAGS_EXPAND_MINOR);
+
+ theme_dirs_create ();
+}
diff --git a/gnome-applets/geyes/geyes-applet.h b/gnome-applets/geyes/geyes-applet.h
new file mode 100644
index 000000000..a6616602a
--- /dev/null
+++ b/gnome-applets/geyes/geyes-applet.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2020 Alberts Muktupāvels
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GEYES_APPLET_H
+#define GEYES_APPLET_H
+
+#include <libgnome-panel/gp-applet.h>
+
+G_BEGIN_DECLS
+
+#define EYES_TYPE_APPLET (eyes_applet_get_type ())
+G_DECLARE_FINAL_TYPE (EyesApplet, eyes_applet, EYES, APPLET, GpApplet)
+
+G_END_DECLS
+
+#endif
diff --git a/geyes/src/themes.c b/gnome-applets/geyes/themes.c
similarity index 98%
rename from geyes/src/themes.c
rename to gnome-applets/geyes/themes.c
index 428cf5e41..798f891cf 100644
--- a/geyes/src/themes.c
+++ b/gnome-applets/geyes/themes.c
@@ -16,13 +16,16 @@
*
*/
-#include <config.h>
+#include "config.h"
+
#include <string.h>
#include <dirent.h>
#include <limits.h>
#include <ctype.h>
+#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
-#include "geyes.h"
+
+#include "geyes-applet-private.h"
#define NUM_THEME_DIRECTORIES 2
#define HIG_IDENTATION " "
@@ -142,7 +145,7 @@ load_theme (EyesApplet *eyes_applet, const gchar *theme_dir)
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
- gtk_widget_destroy (GTK_WIDGET (eyes_applet->applet));
+ gtk_widget_destroy (GTK_WIDGET (eyes_applet));
return FALSE;
}
@@ -285,7 +288,7 @@ properties_cb (GSimpleAction *action,
if (eyes_applet->prop_box.pbox) {
gtk_window_set_screen (
GTK_WINDOW (eyes_applet->prop_box.pbox),
- gtk_widget_get_screen (GTK_WIDGET (eyes_applet->applet)));
+ gtk_widget_get_screen (GTK_WIDGET (eyes_applet)));
gtk_window_present (GTK_WINDOW (eyes_applet->prop_box.pbox));
return;
}
@@ -297,7 +300,7 @@ properties_cb (GSimpleAction *action,
NULL);
gtk_window_set_screen (GTK_WINDOW (pbox),
- gtk_widget_get_screen (GTK_WIDGET (eyes_applet->applet)));
+ gtk_widget_get_screen (GTK_WIDGET (eyes_applet)));
gtk_widget_set_size_request (GTK_WIDGET (pbox), 300, 200);
gtk_dialog_set_default_response(GTK_DIALOG (pbox), GTK_RESPONSE_CLOSE);
@@ -428,5 +431,3 @@ properties_cb (GSimpleAction *action,
return;
}
-
-
diff --git a/geyes/themes/Bizarre/Bizarre-eye.png b/gnome-applets/geyes/themes/Bizarre/Bizarre-eye.png
similarity index 100%
rename from geyes/themes/Bizarre/Bizarre-eye.png
rename to gnome-applets/geyes/themes/Bizarre/Bizarre-eye.png
diff --git a/geyes/themes/Bizarre/Bizarre-pupil.png b/gnome-applets/geyes/themes/Bizarre/Bizarre-pupil.png
similarity index 100%
rename from geyes/themes/Bizarre/Bizarre-pupil.png
rename to gnome-applets/geyes/themes/Bizarre/Bizarre-pupil.png
diff --git a/geyes/themes/Bizarre/config b/gnome-applets/geyes/themes/Bizarre/config
similarity index 100%
rename from geyes/themes/Bizarre/config
rename to gnome-applets/geyes/themes/Bizarre/config
diff --git a/geyes/themes/Bloodshot/Bloodshot-eye.png b/gnome-applets/geyes/themes/Bloodshot/Bloodshot-eye.png
similarity index 100%
rename from geyes/themes/Bloodshot/Bloodshot-eye.png
rename to gnome-applets/geyes/themes/Bloodshot/Bloodshot-eye.png
diff --git a/geyes/themes/Bloodshot/Bloodshot-pupil.png
b/gnome-applets/geyes/themes/Bloodshot/Bloodshot-pupil.png
similarity index 100%
rename from geyes/themes/Bloodshot/Bloodshot-pupil.png
rename to gnome-applets/geyes/themes/Bloodshot/Bloodshot-pupil.png
diff --git a/geyes/themes/Bloodshot/config b/gnome-applets/geyes/themes/Bloodshot/config
similarity index 100%
rename from geyes/themes/Bloodshot/config
rename to gnome-applets/geyes/themes/Bloodshot/config
diff --git a/geyes/themes/Brown-EyedGirl/brown-eye.png
b/gnome-applets/geyes/themes/Brown-EyedGirl/brown-eye.png
similarity index 100%
rename from geyes/themes/Brown-EyedGirl/brown-eye.png
rename to gnome-applets/geyes/themes/Brown-EyedGirl/brown-eye.png
diff --git a/geyes/themes/Brown-EyedGirl/brown-pupil.png
b/gnome-applets/geyes/themes/Brown-EyedGirl/brown-pupil.png
similarity index 100%
rename from geyes/themes/Brown-EyedGirl/brown-pupil.png
rename to gnome-applets/geyes/themes/Brown-EyedGirl/brown-pupil.png
diff --git a/geyes/themes/Brown-EyedGirl/config b/gnome-applets/geyes/themes/Brown-EyedGirl/config
similarity index 100%
rename from geyes/themes/Brown-EyedGirl/config
rename to gnome-applets/geyes/themes/Brown-EyedGirl/config
diff --git a/geyes/themes/Default-tiny/Default-tiny-eye.png
b/gnome-applets/geyes/themes/Default-tiny/Default-tiny-eye.png
similarity index 100%
rename from geyes/themes/Default-tiny/Default-tiny-eye.png
rename to gnome-applets/geyes/themes/Default-tiny/Default-tiny-eye.png
diff --git a/geyes/themes/Default-tiny/Default-tiny-pupil.png
b/gnome-applets/geyes/themes/Default-tiny/Default-tiny-pupil.png
similarity index 100%
rename from geyes/themes/Default-tiny/Default-tiny-pupil.png
rename to gnome-applets/geyes/themes/Default-tiny/Default-tiny-pupil.png
diff --git a/geyes/themes/Default-tiny/config b/gnome-applets/geyes/themes/Default-tiny/config
similarity index 100%
rename from geyes/themes/Default-tiny/config
rename to gnome-applets/geyes/themes/Default-tiny/config
diff --git a/geyes/themes/Default/Default-eye.png b/gnome-applets/geyes/themes/Default/Default-eye.png
similarity index 100%
rename from geyes/themes/Default/Default-eye.png
rename to gnome-applets/geyes/themes/Default/Default-eye.png
diff --git a/geyes/themes/Default/Default-pupil.png b/gnome-applets/geyes/themes/Default/Default-pupil.png
similarity index 100%
rename from geyes/themes/Default/Default-pupil.png
rename to gnome-applets/geyes/themes/Default/Default-pupil.png
diff --git a/geyes/themes/Default/config b/gnome-applets/geyes/themes/Default/config
similarity index 100%
rename from geyes/themes/Default/config
rename to gnome-applets/geyes/themes/Default/config
diff --git a/geyes/themes/EyelashLarge/config b/gnome-applets/geyes/themes/EyelashLarge/config
similarity index 100%
rename from geyes/themes/EyelashLarge/config
rename to gnome-applets/geyes/themes/EyelashLarge/config
diff --git a/geyes/themes/EyelashLarge/eye.png b/gnome-applets/geyes/themes/EyelashLarge/eye.png
similarity index 100%
rename from geyes/themes/EyelashLarge/eye.png
rename to gnome-applets/geyes/themes/EyelashLarge/eye.png
diff --git a/geyes/themes/EyelashLarge/pupil.png b/gnome-applets/geyes/themes/EyelashLarge/pupil.png
similarity index 100%
rename from geyes/themes/EyelashLarge/pupil.png
rename to gnome-applets/geyes/themes/EyelashLarge/pupil.png
diff --git a/geyes/themes/Green-EyedGirl/config b/gnome-applets/geyes/themes/Green-EyedGirl/config
similarity index 100%
rename from geyes/themes/Green-EyedGirl/config
rename to gnome-applets/geyes/themes/Green-EyedGirl/config
diff --git a/geyes/themes/Green-EyedGirl/green-eye.png
b/gnome-applets/geyes/themes/Green-EyedGirl/green-eye.png
similarity index 100%
rename from geyes/themes/Green-EyedGirl/green-eye.png
rename to gnome-applets/geyes/themes/Green-EyedGirl/green-eye.png
diff --git a/geyes/themes/Green-EyedGirl/green-pupil.png
b/gnome-applets/geyes/themes/Green-EyedGirl/green-pupil.png
similarity index 100%
rename from geyes/themes/Green-EyedGirl/green-pupil.png
rename to gnome-applets/geyes/themes/Green-EyedGirl/green-pupil.png
diff --git a/geyes/themes/Horrid/config b/gnome-applets/geyes/themes/Horrid/config
similarity index 100%
rename from geyes/themes/Horrid/config
rename to gnome-applets/geyes/themes/Horrid/config
diff --git a/geyes/themes/Horrid/horrid_eye.png b/gnome-applets/geyes/themes/Horrid/horrid_eye.png
similarity index 100%
rename from geyes/themes/Horrid/horrid_eye.png
rename to gnome-applets/geyes/themes/Horrid/horrid_eye.png
diff --git a/geyes/themes/Horrid/horrid_pupil.png b/gnome-applets/geyes/themes/Horrid/horrid_pupil.png
similarity index 100%
rename from geyes/themes/Horrid/horrid_pupil.png
rename to gnome-applets/geyes/themes/Horrid/horrid_pupil.png
diff --git a/geyes/themes/Makefile.am b/gnome-applets/geyes/themes/Makefile.am
similarity index 100%
rename from geyes/themes/Makefile.am
rename to gnome-applets/geyes/themes/Makefile.am
diff --git a/geyes/themes/Pink-EyedGirl/config b/gnome-applets/geyes/themes/Pink-EyedGirl/config
similarity index 100%
rename from geyes/themes/Pink-EyedGirl/config
rename to gnome-applets/geyes/themes/Pink-EyedGirl/config
diff --git a/geyes/themes/Pink-EyedGirl/pink-eye.png b/gnome-applets/geyes/themes/Pink-EyedGirl/pink-eye.png
similarity index 100%
rename from geyes/themes/Pink-EyedGirl/pink-eye.png
rename to gnome-applets/geyes/themes/Pink-EyedGirl/pink-eye.png
diff --git a/geyes/themes/Pink-EyedGirl/pink-pupil.png
b/gnome-applets/geyes/themes/Pink-EyedGirl/pink-pupil.png
similarity index 100%
rename from geyes/themes/Pink-EyedGirl/pink-pupil.png
rename to gnome-applets/geyes/themes/Pink-EyedGirl/pink-pupil.png
diff --git a/geyes/themes/PumpkinMonster/config b/gnome-applets/geyes/themes/PumpkinMonster/config
similarity index 100%
rename from geyes/themes/PumpkinMonster/config
rename to gnome-applets/geyes/themes/PumpkinMonster/config
diff --git a/geyes/themes/PumpkinMonster/eye.png b/gnome-applets/geyes/themes/PumpkinMonster/eye.png
similarity index 100%
rename from geyes/themes/PumpkinMonster/eye.png
rename to gnome-applets/geyes/themes/PumpkinMonster/eye.png
diff --git a/geyes/themes/PumpkinMonster/pupil.png b/gnome-applets/geyes/themes/PumpkinMonster/pupil.png
similarity index 100%
rename from geyes/themes/PumpkinMonster/pupil.png
rename to gnome-applets/geyes/themes/PumpkinMonster/pupil.png
diff --git a/geyes/themes/Tango/config b/gnome-applets/geyes/themes/Tango/config
similarity index 100%
rename from geyes/themes/Tango/config
rename to gnome-applets/geyes/themes/Tango/config
diff --git a/geyes/themes/Tango/tango-eye.png b/gnome-applets/geyes/themes/Tango/tango-eye.png
similarity index 100%
rename from geyes/themes/Tango/tango-eye.png
rename to gnome-applets/geyes/themes/Tango/tango-eye.png
diff --git a/geyes/themes/Tango/tango-pupil.png b/gnome-applets/geyes/themes/Tango/tango-pupil.png
similarity index 100%
rename from geyes/themes/Tango/tango-pupil.png
rename to gnome-applets/geyes/themes/Tango/tango-pupil.png
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 112f866ed..8b3057ab7 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -16,10 +16,6 @@ data/schemas/org.gnome.gnome-applets.timer.gschema.xml.in.in
data/schemas/org.gnome.gnome-applets.window-buttons.gschema.xml.in.in
data/schemas/org.gnome.gnome-applets.window-picker-applet.gschema.xml.in.in
data/schemas/org.gnome.gnome-applets.window-title.gschema.xml.in.in
-[type: gettext/glade]geyes/geyes-applet-menu.xml
-[type: gettext/ini]geyes/org.gnome.applets.GeyesApplet.panel-applet.in.in
-geyes/src/geyes.c
-geyes/src/themes.c
[type: gettext/glade]gnome-applets/accessx-status/accessx-status-applet-menu.xml
gnome-applets/accessx-status/accessx-status-applet.c
[type: gettext/glade]gnome-applets/battstat/battstat-applet-menu.xml
@@ -43,6 +39,9 @@ gnome-applets/cpufreq/cpufreq-selector/org.gnome.cpufreqselector.policy.in
gnome-applets/drivemount/drive-button.c
gnome-applets/drivemount/drivemount-applet.c
gnome-applets/ga-module.c
+[type: gettext/glade]gnome-applets/geyes/geyes-applet-menu.xml
+gnome-applets/geyes/geyes-applet.c
+gnome-applets/geyes/themes.c
[type: gettext/glade]gnome-applets/gweather/gweather-applet-menu.xml
gnome-applets/gweather/gweather-applet.c
gnome-applets/gweather/gweather-dialog.c
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index fe5b59fec..937aae214 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -17,7 +17,6 @@ data/schemas/org.gnome.gnome-applets.timer.gschema.xml.in
data/schemas/org.gnome.gnome-applets.window-buttons.gschema.xml.in
data/schemas/org.gnome.gnome-applets.window-picker-applet.gschema.xml.in
data/schemas/org.gnome.gnome-applets.window-title.gschema.xml.in
-geyes/org.gnome.applets.GeyesApplet.panel-applet.in
mini-commander/src/org.gnome.applets.MiniCommanderApplet.panel-applet.in
multiload/org.gnome.applets.MultiLoadApplet.panel-applet.in
sticky-notes/data/org.gnome.applets.StickyNotesApplet.panel-applet.in
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]