summaryrefslogtreecommitdiff
path: root/shell/maynard.c
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-06-28 10:21:10 +0000
committerschneefux <schneefux+commit@schneefux.xyz>2014-06-28 10:21:10 +0000
commit4d1d7105a344cc7f07e30eebbeec37f95556931d (patch)
tree0a3da24750f353dc1b081557ad9e604b3b795162 /shell/maynard.c
parent924c77b1548936037cb65f2bec0ce7d29c3277ea (diff)
downloadgraynard-4d1d7105a344cc7f07e30eebbeec37f95556931d.tar.gz
graynard-4d1d7105a344cc7f07e30eebbeec37f95556931d.zip
keep only favorites
Diffstat (limited to 'shell/maynard.c')
-rw-r--r--shell/maynard.c62
1 files changed, 1 insertions, 61 deletions
diff --git a/shell/maynard.c b/shell/maynard.c
index 880487f..a74cd08 100644
--- a/shell/maynard.c
+++ b/shell/maynard.c
@@ -34,10 +34,8 @@
#include "maynard-resources.h"
#include "app-icon.h"
-#include "clock.h"
#include "favorites.h"
#include "panel.h"
-#include "vertical-clock.h"
extern char **environ; /* defined by libc */
@@ -60,7 +58,6 @@ struct desktop {
struct element *background;
struct element *panel;
- struct element *clock;
guint initial_panel_timeout_id;
guint hide_panel_idle_id;
@@ -82,11 +79,6 @@ connect_enter_leave_signals (gpointer data)
g_signal_connect (desktop->panel->window, "leave-notify-event",
G_CALLBACK (panel_window_leave_cb), desktop);
- g_signal_connect (desktop->clock->window, "enter-notify-event",
- G_CALLBACK (panel_window_enter_cb), desktop);
- g_signal_connect (desktop->clock->window, "leave-notify-event",
- G_CALLBACK (panel_window_leave_cb), desktop);
-
return G_SOURCE_REMOVE;
}
@@ -111,12 +103,6 @@ desktop_shell_configure (void *data,
shell_helper_move_surface (desktop->helper, desktop->panel->surface,
0, (height - window_height) / 2);
- gtk_window_resize (GTK_WINDOW (desktop->clock->window),
- MAYNARD_CLOCK_WIDTH, MAYNARD_CLOCK_HEIGHT);
-
- shell_helper_move_surface (desktop->helper, desktop->clock->surface,
- MAYNARD_PANEL_WIDTH, (height - window_height) / 2);
-
desktop_shell_desktop_ready (desktop->shell);
/* TODO: why does the panel signal leave on drawing for
@@ -145,29 +131,6 @@ static const struct desktop_shell_listener listener = {
desktop_shell_grab_cursor
};
-static GtkWidget *
-clock_create (struct desktop *desktop)
-{
- struct element *clock;
- GdkWindow *gdk_window;
-
- clock = malloc (sizeof *clock);
- memset (clock, 0, sizeof *clock);
-
- clock->window = maynard_clock_new ();
-
- gdk_window = gtk_widget_get_window (clock->window);
- clock->surface = gdk_wayland_window_get_wl_surface (gdk_window);
-
- gdk_wayland_window_set_use_custom_surface (gdk_window);
- shell_helper_add_surface_to_layer (desktop->helper, clock->surface,
- desktop->panel->surface);
-
- gtk_widget_show_all (clock->window);
-
- desktop->clock = clock;
-}
-
static void
button_toggled_cb (struct desktop *desktop,
gboolean *visible,
@@ -175,9 +138,6 @@ button_toggled_cb (struct desktop *desktop,
{
*visible = !*visible;
*not_visible = FALSE;
-
- maynard_clock_show_section (MAYNARD_CLOCK (desktop->clock->window),
- MAYNARD_CLOCK_SECTION_CLOCK);
}
static gboolean
@@ -200,10 +160,6 @@ panel_window_enter_cb (GtkWidget *widget,
shell_helper_slide_surface_back (desktop->helper,
desktop->panel->surface);
- shell_helper_slide_surface_back (desktop->helper,
- desktop->clock->surface);
-
- maynard_panel_set_expand (MAYNARD_PANEL (desktop->panel->window), TRUE);
return FALSE;
}
@@ -216,21 +172,6 @@ leave_panel_idle_cb (gpointer data)
desktop->hide_panel_idle_id = 0;
- gtk_window_get_size (GTK_WINDOW (desktop->clock->window),
- &width, NULL);
-
- shell_helper_slide_surface (desktop->helper,
- desktop->panel->surface,
- MAYNARD_VERTICAL_CLOCK_WIDTH - MAYNARD_PANEL_WIDTH, 0);
- shell_helper_slide_surface (desktop->helper,
- desktop->clock->surface,
- MAYNARD_VERTICAL_CLOCK_WIDTH - MAYNARD_PANEL_WIDTH - width, 0);
-
- maynard_panel_set_expand (MAYNARD_PANEL (desktop->panel->window), FALSE);
-
- maynard_clock_show_section (MAYNARD_CLOCK (desktop->clock->window),
- MAYNARD_CLOCK_SECTION_CLOCK);
-
return G_SOURCE_REMOVE;
}
@@ -506,10 +447,9 @@ main (int argc,
css_setup (desktop);
background_create (desktop);
- /* panel needs to be first so the clock can
+ /* panel needs to be first so everything else can
* be added to its layer */
panel_create (desktop);
- clock_create (desktop);
gtk_main ();