summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 97c3f51)
raw | patch | inline | side by side (parent: 97c3f51)
author | Eric Wertz <ericdwertz@gmail.com> | |
Fri, 7 Oct 2016 15:48:00 +0000 (11:48 -0400) | ||
committer | Eric Wertz <ericdwertz@gmail.com> | |
Fri, 7 Oct 2016 15:48:00 +0000 (11:48 -0400) |
clock.h | patch | blob | history | |
dock_icon.h | patch | blob | history | |
main.c | patch | blob | history | |
pager_item.h | patch | blob | history |
index a82c2af0681042b3bab99ae3673ccd146682865d..0692d891aeb773ccb9308be44d511d5af663a595 100644 (file)
--- a/clock.h
+++ b/clock.h
sprintf(timestring,"%i:%02i%s",hour, minute, ampm);
cairo_text_extents(cr,timestring,&extents);
text_x-=extents.x_advance;
- cairo_move_to(cr,text_x, y + extents.y_bearing + extents.height - SCALE_VALUE( 2.0 ) );
+ cairo_move_to(cr,text_x, y - SCALE_VALUE( 4.0 ) );
cairo_text_path(cr,timestring);
- sprintf(timestring,"%02i/%02i/%02i",
- timeinfo->tm_mon, timeinfo->tm_mday, timeinfo->tm_year + 1900 );
+ sprintf(timestring,"%i/%02i/%02i",
+ timeinfo->tm_mon+1, timeinfo->tm_mday, timeinfo->tm_year + 1900 );
cairo_text_extents(cr,timestring,&extents);
text_x = x - extents.x_advance;
- cairo_move_to(cr,text_x, y - extents.y_bearing + SCALE_VALUE( 2.0 ) );
+ cairo_move_to(cr,text_x, y - extents.y_bearing + SCALE_VALUE( 4.0 ) );
cairo_text_path(cr,timestring);
//sprintf(timestring,"%s, %s %i, %i",weekday_names[timeinfo->tm_wday],month_names[timeinfo->tm_mon],timeinfo->tm_mday,timeinfo->tm_year+1900);
diff --git a/dock_icon.h b/dock_icon.h
index 2f376f6a9b628ba6c9e7783de4d90f0126d93b9f..16a18df7f7daf445f29fdf02690e5d3054f2a47b 100644 (file)
--- a/dock_icon.h
+++ b/dock_icon.h
wnck_window_activate( item->window, time );
tooltip_window_hide();
}
+
+ if( icon->icon_state == ICON_STATE_ALERT )
+ icon->icon_state = ICON_STATE_NORMAL;
}
void dock_icon_mouse_down( dock_icon* icon, double mx, double my, Time time )
index b8c1ee8a7a297e87ced4a004eaa8f0b216f6815d..c55b76535103c7216ef0544148834a4a1c11c004 100644 (file)
--- a/main.c
+++ b/main.c
#define ICON_STATE_NORMAL 0
#define ICON_STATE_HOVER 1
#define ICON_STATE_ACTIVE 2
+#define ICON_STATE_ALERT 3
GList* dock_icons = NULL;
eric_window* dock_window = NULL;
diff --git a/pager_item.h b/pager_item.h
index 7121ba49fe81089ffe1fa8e6b9aacc25cc79dbe2..eb56e78c0cf97f72fa1f9605d7b1a2bcfb407cbc 100644 (file)
--- a/pager_item.h
+++ b/pager_item.h
item->icon_pixbuf = wnck_window_get_mini_icon( window );
}
+void pager_item_state_changed( WnckWindow* window, WnckWindowState changed_mask, WnckWindowState new_state, pager_item* item )
+{
+ //item->icon_pixbuf = wnck_window_get_mini_icon( window );
+}
+
pager_item* pager_item_create( WnckWindow* window )
{
pager_item* item = malloc( sizeof( pager_item ) );
item->icon_state = ICON_STATE_NORMAL;
g_signal_connect( G_OBJECT( window ), "name-changed", G_CALLBACK( pager_item_name_changed ), (gpointer)item );
- g_signal_connect( G_OBJECT( window ), "icon-changed", G_CALLBACK( pager_item_name_changed ), (gpointer)item );
+ g_signal_connect( G_OBJECT( window ), "icon-changed", G_CALLBACK( pager_item_icon_changed ), (gpointer)item );
+ g_signal_connect( G_OBJECT( window ), "state-changed", G_CALLBACK( pager_item_state_changed ), (gpointer)item );
item->width = SCALE_VALUE( 320 );
item->height = SCALE_VALUE( 24.0 );