summaryrefslogtreecommitdiff
path: root/drivemount
diff options
context:
space:
mode:
Diffstat (limited to 'drivemount')
-rw-r--r--drivemount/Makefile.am14
-rw-r--r--drivemount/drive-button.c25
-rw-r--r--drivemount/drive-list.c17
-rw-r--r--drivemount/drivemount.c3
-rw-r--r--drivemount/org.mate.applets.DriveMountApplet.mate-panel-applet.in.in2
-rw-r--r--drivemount/org.mate.panel.applet.DriveMountAppletFactory.service.in2
6 files changed, 12 insertions, 51 deletions
diff --git a/drivemount/Makefile.am b/drivemount/Makefile.am
index 46a6c195..b2e99df5 100644
--- a/drivemount/Makefile.am
+++ b/drivemount/Makefile.am
@@ -4,19 +4,21 @@ AM_CPPFLAGS = \
-I. \
-I$(srcdir) \
-DDRIVEMOUNT_MENU_UI_DIR=\""$(uidir)"\" \
- $(MATE_APPLETS4_CFLAGS)
+ $(MATE_APPLETS4_CFLAGS) \
+ $(MATEDESKTOP_CFLAGS)
-libexec_PROGRAMS = drivemount_applet2
+libexec_PROGRAMS = drivemount-applet
-drivemount_applet2_SOURCES = \
+drivemount_applet_SOURCES = \
drivemount.c \
drive-list.c \
drive-list.h \
drive-button.c \
drive-button.h
-drivemount_applet2_LDADD = \
- $(MATE_APPLETS4_LIBS)
+drivemount_applet_LDADD = \
+ $(MATE_APPLETS4_LIBS) \
+ $(MATEDESKTOP_LIBS)
appletdir = $(datadir)/mate-panel/applets
@@ -40,7 +42,7 @@ org.mate.panel.applet.DriveMountAppletFactory.service: $(service_in_files)
-e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
$< > $@
-uidir = $(datadir)/mate-2.0/ui
+uidir = $(datadir)/mate/ui
ui_DATA = drivemount-applet-menu.xml
CLEANFILES = $(applet_DATA) $(applet_DATA).in $(service_DATA)
diff --git a/drivemount/drive-button.c b/drivemount/drive-button.c
index be8b4fa5..51f13c1c 100644
--- a/drivemount/drive-button.c
+++ b/drivemount/drive-button.c
@@ -53,11 +53,7 @@ static void drive_button_set_mount (DriveButton *self,
static void drive_button_reset_popup (DriveButton *self);
static void drive_button_ensure_popup (DriveButton *self);
-#if GTK_CHECK_VERSION (3, 0, 0)
static void drive_button_dispose (GObject *object);
-#else
-static void drive_button_destroy (GtkObject *object);
-#endif
#if 0
static void drive_button_unrealize (GtkWidget *widget);
#endif /* 0 */
@@ -71,11 +67,7 @@ static void drive_button_theme_change (GtkIconTheme *icon_theme,
static void
drive_button_class_init (DriveButtonClass *class)
{
-#if GTK_CHECK_VERSION (3, 0, 0)
G_OBJECT_CLASS(class)->dispose = drive_button_dispose;
-#else
- GTK_OBJECT_CLASS(class)->destroy = drive_button_destroy;
-#endif
GTK_WIDGET_CLASS(class)->button_press_event = drive_button_button_press;
GTK_WIDGET_CLASS(class)->key_press_event = drive_button_key_press;
@@ -142,11 +134,7 @@ drive_button_new_from_mount (GMount *mount)
}
static void
-#if GTK_CHECK_VERSION (3, 0, 0)
drive_button_dispose (GObject *object)
-#else
-drive_button_destroy (GtkObject *object)
-#endif
{
DriveButton *self = DRIVE_BUTTON (object);
@@ -158,13 +146,8 @@ drive_button_destroy (GtkObject *object)
drive_button_reset_popup (self);
-#if GTK_CHECK_VERSION (3, 0, 0)
if (G_OBJECT_CLASS (drive_button_parent_class)->dispose)
(* G_OBJECT_CLASS (drive_button_parent_class)->dispose) (object);
-#else
- if (GTK_OBJECT_CLASS (drive_button_parent_class)->destroy)
- (* GTK_OBJECT_CLASS (drive_button_parent_class)->destroy) (object);
-#endif
}
#if 0
@@ -476,11 +459,7 @@ static void
drive_button_reset_popup (DriveButton *self)
{
if (self->popup_menu)
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_destroy (GTK_WIDGET (self->popup_menu));
-#else
- gtk_object_destroy (GTK_OBJECT (self->popup_menu));
-#endif
self->popup_menu = NULL;
}
@@ -623,11 +602,7 @@ open_drive (DriveButton *self, GtkWidget *item)
else
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "Could not find Caja", NULL);
g_signal_connect (dialog, "response",
-#if GTK_CHECK_VERSION (3, 0, 0)
G_CALLBACK (gtk_widget_destroy), NULL);
-#else
- G_CALLBACK (gtk_object_destroy), NULL);
-#endif
gtk_widget_show (dialog);
g_error_free (error);
}
diff --git a/drivemount/drive-list.c b/drivemount/drive-list.c
index 26163160..e249482f 100644
--- a/drivemount/drive-list.c
+++ b/drivemount/drive-list.c
@@ -35,11 +35,7 @@ G_DEFINE_TYPE (DriveList, drive_list, GTK_TYPE_TABLE);
static GVolumeMonitor *volume_monitor = NULL;
static void drive_list_finalize (GObject *object);
-#if GTK_CHECK_VERSION (3, 0, 0)
static void drive_list_dispose (GObject *object);
-#else
-static void drive_list_destroy (GtkObject *object);
-#endif
static void drive_list_add (GtkContainer *container, GtkWidget *child);
static void drive_list_remove (GtkContainer *container, GtkWidget *child);
@@ -74,11 +70,7 @@ static void
drive_list_class_init (DriveListClass *class)
{
G_OBJECT_CLASS (class)->finalize = drive_list_finalize;
-#if GTK_CHECK_VERSION (3, 0, 0)
G_OBJECT_CLASS (class)->dispose = drive_list_dispose;
-#else
- GTK_OBJECT_CLASS (class)->destroy = drive_list_destroy;
-#endif
GTK_CONTAINER_CLASS (class)->add = drive_list_add;
GTK_CONTAINER_CLASS (class)->remove = drive_list_remove;
}
@@ -152,11 +144,7 @@ drive_list_finalize (GObject *object)
}
static void
-#if GTK_CHECK_VERSION (3, 0, 0)
drive_list_dispose (GObject *object)
-#else
-drive_list_destroy (GtkObject *object)
-#endif
{
DriveList *self = DRIVE_LIST (object);
@@ -177,13 +165,8 @@ drive_list_destroy (GtkObject *object)
g_source_remove (self->layout_tag);
self->layout_tag = 0;
-#if GTK_CHECK_VERSION (3, 0, 0)
if (G_OBJECT_CLASS (drive_list_parent_class)->dispose)
(* G_OBJECT_CLASS (drive_list_parent_class)->dispose) (object);
-#else
- if (GTK_OBJECT_CLASS (drive_list_parent_class)->destroy)
- (* GTK_OBJECT_CLASS (drive_list_parent_class)->destroy) (object);
-#endif
}
static void
diff --git a/drivemount/drivemount.c b/drivemount/drivemount.c
index 60fa1457..90362970 100644
--- a/drivemount/drivemount.c
+++ b/drivemount/drivemount.c
@@ -28,6 +28,7 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
+#include <libmate-desktop/mate-aboutdialog.h>
#include <mate-panel-applet.h>
#include "drive-list.h"
@@ -112,7 +113,7 @@ display_about_dialog (GtkAction *action,
NULL
};
- gtk_show_about_dialog (NULL,
+ mate_show_about_dialog (NULL,
"version", VERSION,
"copyright", "Copyright \xC2\xA9 2004 Canonical Ltd",
"comments", _("Applet for mounting and unmounting block volumes."),
diff --git a/drivemount/org.mate.applets.DriveMountApplet.mate-panel-applet.in.in b/drivemount/org.mate.applets.DriveMountApplet.mate-panel-applet.in.in
index 376c9447..2cff60f5 100644
--- a/drivemount/org.mate.applets.DriveMountApplet.mate-panel-applet.in.in
+++ b/drivemount/org.mate.applets.DriveMountApplet.mate-panel-applet.in.in
@@ -1,6 +1,6 @@
[Applet Factory]
Id=DriveMountAppletFactory
-Location=@LIBEXECDIR@/drivemount_applet2
+Location=@LIBEXECDIR@/drivemount-applet
_Name=Drive Mount Applet Factory
_Description=Factory for drive mount applet
diff --git a/drivemount/org.mate.panel.applet.DriveMountAppletFactory.service.in b/drivemount/org.mate.panel.applet.DriveMountAppletFactory.service.in
index 454d0a1f..898c4f09 100644
--- a/drivemount/org.mate.panel.applet.DriveMountAppletFactory.service.in
+++ b/drivemount/org.mate.panel.applet.DriveMountAppletFactory.service.in
@@ -1,3 +1,3 @@
[D-BUS Service]
Name=org.mate.panel.applet.DriveMountAppletFactory
-Exec=@LIBEXECDIR@/drivemount_applet2
+Exec=@LIBEXECDIR@/drivemount-applet