summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2015-01-25 18:38:26 +0100
committerJavier <dev.git@javispedro.com>2015-01-25 18:38:26 +0100
commit65b0341953561e3b15ee65cc57ebd056ed2eea19 (patch)
tree5f8f048d7ab39da6627e1eeb12e28388cdd3a9af
parent9e57caac16b1541336b6d2ce76e8ac8edf55474f (diff)
downloadmdock-65b0341953561e3b15ee65cc57ebd056ed2eea19.tar.gz
mdock-65b0341953561e3b15ee65cc57ebd056ed2eea19.zip
additional panel applet issues
-rw-r--r--libmdock/mdock-item.c2
-rw-r--r--libmdock/mdock-widget.c17
-rw-r--r--libmdock/mdock-window.c8
-rw-r--r--mate-applet/mdock-mate-panel-applet.c2
4 files changed, 14 insertions, 15 deletions
diff --git a/libmdock/mdock-item.c b/libmdock/mdock-item.c
index aa3045f..87a4f49 100644
--- a/libmdock/mdock-item.c
+++ b/libmdock/mdock-item.c
@@ -370,7 +370,7 @@ void mdock_item_remove_window(MDockItem *self, WnckWindow *window)
if (self->priv->last_active == window) {
self->priv->last_active = NULL;
}
- if (self->priv->windows) {
+ if (!self->priv->windows) {
// If there are no windows left,
// we want to redraw in order to remove the "active" indicator.
gtk_widget_queue_draw(GTK_WIDGET(self));
diff --git a/libmdock/mdock-widget.c b/libmdock/mdock-widget.c
index 561a5b4..cd71999 100644
--- a/libmdock/mdock-widget.c
+++ b/libmdock/mdock-widget.c
@@ -218,18 +218,23 @@ static void handle_item_pinned_changed(MDockWidget *self, GParamSpec *spec, MDoc
static gboolean handle_item_button_press(MDockWidget *self, GdkEventButton *event, MDockItem *item)
{
- if (self->priv->popup_timer) {
- g_source_remove(self->priv->popup_timer);
- self->priv->popup_timer = 0;
- }
- if (self->priv->current_popup_item) {
- hide_item_popup(self);
+ if (event->button != 1) {
+ if (self->priv->popup_timer) {
+ g_source_remove(self->priv->popup_timer);
+ self->priv->popup_timer = 0;
+ }
+ if (self->priv->current_popup_item) {
+ hide_item_popup(self);
+ }
}
switch (event->button) {
case 1:
self->priv->primary_button_down = TRUE;
break;
+ case 2:
+ return FALSE; // Let the panel handle a middle button press.
+ break;
case 3:
gtk_menu_popup(GTK_MENU(g_object_get_qdata(G_OBJECT(item), mdock_widget_item_menu_quark())),
NULL, NULL, NULL, NULL, event->button, event->time);
diff --git a/libmdock/mdock-window.c b/libmdock/mdock-window.c
index 7690ce6..c53e7ef 100644
--- a/libmdock/mdock-window.c
+++ b/libmdock/mdock-window.c
@@ -149,7 +149,7 @@ static void mdock_window_constructed(GObject *object)
static void mdock_window_dispose(GObject *object)
{
- MDockWindow *self = MDOCK_WINDOW(self);
+ MDockWindow *self = MDOCK_WINDOW(object);
if (self->priv->screenshot_timeout) {
g_source_remove(self->priv->screenshot_timeout);
self->priv->screenshot_timeout = 0;
@@ -157,11 +157,6 @@ static void mdock_window_dispose(GObject *object)
G_OBJECT_CLASS(mdock_window_parent_class)->dispose(object);
}
-static void mdock_window_finalize(GObject *object)
-{
- G_OBJECT_CLASS(mdock_window_parent_class)->finalize(object);
-}
-
static void mdock_window_class_init (MDockWindowClass *klass)
{
GObjectClass *obj_class = G_OBJECT_CLASS(klass);
@@ -169,7 +164,6 @@ static void mdock_window_class_init (MDockWindowClass *klass)
obj_class->get_property = mdock_window_get_property;
obj_class->constructed = mdock_window_constructed;
obj_class->dispose = mdock_window_dispose;
- obj_class->finalize = mdock_window_finalize;
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
widget_class->enter_notify_event = mdock_window_enter_notify;
widget_class->leave_notify_event = mdock_window_leave_notify;
diff --git a/mate-applet/mdock-mate-panel-applet.c b/mate-applet/mdock-mate-panel-applet.c
index 62d0bde..4b3f070 100644
--- a/mate-applet/mdock-mate-panel-applet.c
+++ b/mate-applet/mdock-mate-panel-applet.c
@@ -143,7 +143,7 @@ static void mdock_mate_panel_applet_init(MDockMatePanelApplet *self)
menu_verbs, G_N_ELEMENTS(menu_verbs), self);
mate_panel_applet_set_flags(applet,
- MATE_PANEL_APPLET_EXPAND_MINOR);
+ MATE_PANEL_APPLET_EXPAND_MINOR | MATE_PANEL_APPLET_HAS_HANDLE);
mate_panel_applet_setup_menu(applet,
"<menuitem name=\"MDock Preferences Item\" action=\"MDockPreferences\"/>"
"<menuitem name=\"MDock About Item\" action=\"MDockAbout\"/>",