diff options
-rw-r--r-- | x11/Makefile | 1 | ||||
-rw-r--r-- | x11/brightside/Makefile | 25 | ||||
-rw-r--r-- | x11/brightside/distinfo | 2 | ||||
-rw-r--r-- | x11/brightside/files/patch-src_brightside-tray.c | 19 | ||||
-rw-r--r-- | x11/brightside/files/patch-src_brightside-util.c | 13 | ||||
-rw-r--r-- | x11/brightside/files/patch-src_brightside.c | 322 | ||||
-rw-r--r-- | x11/brightside/pkg-descr | 12 | ||||
-rw-r--r-- | x11/brightside/pkg-plist | 72 |
8 files changed, 466 insertions, 0 deletions
diff --git a/x11/Makefile b/x11/Makefile index b8d0ba83dce1..a5264bfd15fb 100644 --- a/x11/Makefile +++ b/x11/Makefile @@ -23,6 +23,7 @@ SUBDIR += bgrot SUBDIR += blast SUBDIR += bricons + SUBDIR += brightside SUBDIR += buttonbox SUBDIR += chameleon SUBDIR += cnslock diff --git a/x11/brightside/Makefile b/x11/brightside/Makefile new file mode 100644 index 000000000000..98c618c449af --- /dev/null +++ b/x11/brightside/Makefile @@ -0,0 +1,25 @@ +# New ports collection makefile for: brightide +# Date created: 02 July 2004 +# Whom: Joe Marcus Clarke <marcus@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= brightside +PORTVERSION= 1.3.2 +CATEGORIES= x11 +MASTER_SITES= http://home.jesus.ox.ac.uk/~ecatmur/brightside/download/ + +MAINTAINER= marcus@FreeBSD.org +COMMENT= A tool to add reactivity to the edges and corners of the GNOME desktop + +USE_BZIP2= yes +USE_X_PREFIX= yes +USE_GMAKE= yes +USE_LIBTOOL_VER=13 +USE_GNOME= gnomeprefix gnomehack lthack libwnck libgnomeui +CONFIGURE_ARGS= --enable-tray-icon +CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ + LDFLAGS="-L${LOCALBASE}/lib" + +.include <bsd.port.mk> diff --git a/x11/brightside/distinfo b/x11/brightside/distinfo new file mode 100644 index 000000000000..3b245e695cc1 --- /dev/null +++ b/x11/brightside/distinfo @@ -0,0 +1,2 @@ +MD5 (brightside-1.3.2.tar.bz2) = eed041f45dfa5f29796fde9e302d68c6 +SIZE (brightside-1.3.2.tar.bz2) = 700647 diff --git a/x11/brightside/files/patch-src_brightside-tray.c b/x11/brightside/files/patch-src_brightside-tray.c new file mode 100644 index 000000000000..f5c63626b567 --- /dev/null +++ b/x11/brightside/files/patch-src_brightside-tray.c @@ -0,0 +1,19 @@ +--- src/brightside-tray.c.orig Fri Jul 2 01:19:28 2004 ++++ src/brightside-tray.c Fri Jul 2 01:19:56 2004 +@@ -51,6 +51,7 @@ + const gchar *authors[] = { "Ed Catmur <ed@catmur.co.uk>", NULL }; + const gchar *documenters[] = { NULL }; + const gchar *translator_credits = _("translator_credits"); ++ gpointer about_as_gpointer; + + if (about != NULL) { + gdk_window_raise (about->window); +@@ -74,7 +75,7 @@ + + g_signal_connect (G_OBJECT (about), "destroy", + G_CALLBACK (gtk_widget_destroyed), &about); +- gpointer about_as_gpointer = (gpointer) about; ++ about_as_gpointer = (gpointer) about; + g_object_add_weak_pointer (G_OBJECT (about), &about_as_gpointer); + + gtk_widget_show(about); diff --git a/x11/brightside/files/patch-src_brightside-util.c b/x11/brightside/files/patch-src_brightside-util.c new file mode 100644 index 000000000000..8162b0b1795e --- /dev/null +++ b/x11/brightside/files/patch-src_brightside-util.c @@ -0,0 +1,13 @@ +--- src/brightside-util.c.orig Fri Jul 2 01:20:22 2004 ++++ src/brightside-util.c Fri Jul 2 01:20:33 2004 +@@ -64,9 +64,9 @@ + void + execute (char *cmd, gboolean sync, gint *child_pid) + { ++ gboolean retval; + g_assert (!sync || child_pid == NULL); + +- gboolean retval; + + if (cmd == NULL) + return; diff --git a/x11/brightside/files/patch-src_brightside.c b/x11/brightside/files/patch-src_brightside.c new file mode 100644 index 000000000000..d7627da5800d --- /dev/null +++ b/x11/brightside/files/patch-src_brightside.c @@ -0,0 +1,322 @@ +--- src/brightside.c.orig Fri Jul 2 01:21:09 2004 ++++ src/brightside.c Fri Jul 2 01:32:08 2004 +@@ -140,12 +140,12 @@ + { + XWindowAttributes attributes; + WnckWindow *window = wnck_screen_get_active_window (screen); ++ GList *list = wnck_screen_get_windows (screen); + if (window) { + XGetWindowAttributes (display, wnck_window_get_xid (window), + &attributes); + return attributes.root; + } +- GList *list = wnck_screen_get_windows (screen); + if (list) { + window = g_list_first (list)->data; + XGetWindowAttributes (display, wnck_window_get_xid (window), +@@ -740,10 +740,12 @@ + static gboolean + update_bar_volume_cb (Brightside *brightside) + { ++ gint vol; ++ GtkWidget *progress; + if (brightside->dialog_timeout == 0) + return FALSE; +- gint vol = brightside_volume_get_volume (brightside->volobj); +- GtkWidget *progress = glade_xml_get_widget (brightside->xml, ++ vol = brightside_volume_get_volume (brightside->volobj); ++ progress = glade_xml_get_widget (brightside->xml, + "progressbar"); + gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progress), + (double) vol / 100); +@@ -760,15 +762,17 @@ + static gboolean + update_bar_timed_cb (Brightside *brightside) + { ++ GTimeVal time_now; ++ GtkWidget *progress; ++ glong elapsed_msec; + if (brightside->dialog_timeout == 0) + return FALSE; +- GTimeVal time_now; + g_get_current_time (&time_now); +- glong elapsed_msec = ABS (TIMEVAL_ELAPSED_MSEC (time_now, ++ elapsed_msec = ABS (TIMEVAL_ELAPSED_MSEC (time_now, + brightside->time_progress_bar)); + if (elapsed_msec > DIALOG_TIMEOUT) + return FALSE; +- GtkWidget *progress = glade_xml_get_widget (brightside->xml, ++ progress = glade_xml_get_widget (brightside->xml, + "progressbar"); + gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progress), + (double) elapsed_msec / DIALOG_TIMEOUT); +@@ -1096,6 +1100,7 @@ + GList *list = wnck_screen_get_windows (screen); + GList *tmp; + int i; ++ int j; + WnckWindow *windows [g_list_length (list)]; + + /* in bottom-to-top order */ +@@ -1105,8 +1110,9 @@ + for (i = 0, tmp = g_list_first (list); tmp != NULL; + tmp = g_list_next (tmp)) { + WnckWindow *window = tmp->data; ++ WnckWindowType type; + g_assert (WNCK_IS_WINDOW (window)); +- WnckWindowType type = wnck_window_get_window_type (window); ++ type = wnck_window_get_window_type (window); + if (type == WNCK_WINDOW_NORMAL || type == WNCK_WINDOW_DIALOG + || type == WNCK_WINDOW_TOOLBAR + || type == WNCK_WINDOW_MENU +@@ -1115,11 +1121,12 @@ + WnckWorkspace *workspace = wnck_window_get_workspace ( + window); + Window xwindow = wnck_window_get_xid (window); ++ int wwidth, wheight, x, y, width, height; ++ XWindowAttributes attributes; + if (xwindow == avoid) + continue; +- int wwidth = wnck_workspace_get_width (workspace); +- int wheight = wnck_workspace_get_height (workspace); +- int x, y, width, height; ++ wwidth = wnck_workspace_get_width (workspace); ++ wheight = wnck_workspace_get_height (workspace); + /* Trouble: this gets position of internal window, + * not including decorations. However, XMoveWindow + * moves the decorated window. So, use +@@ -1127,7 +1134,6 @@ + * internal window from decorations. */ + wnck_window_get_geometry (window, + &x, &y, &width, &height); +- XWindowAttributes attributes; + XGetWindowAttributes (xdisplay, xwindow, &attributes); + if ((edge == LEFT || edge == RIGHT) && + !wnck_window_is_maximized (window) && +@@ -1160,7 +1166,6 @@ + } + } + /* Restack from top to bottom - XRestackWindows doesn't seem to work */ +- int j; + if (REGION_IS_EDGE (edge)) + for (j = 0; j < i; ++j) + XLowerWindow (xdisplay, +@@ -1176,20 +1181,20 @@ + wnck_screen_get_active_workspace (brightside->screen); + int workspace_index = wnck_workspace_get_number (active_workspace); + int workspace_count = wnck_screen_get_workspace_count (brightside->screen); ++ int n_columns, n_rows, new_index; ++ WnckWorkspace *new_workspace; + + workspace_info *w_info = g_new (workspace_info, 1); + if (get_workspace_info (w_info, brightside) == FALSE) { + g_free (w_info); + return FALSE; + } +- int n_columns = w_info->cols; +- int n_rows = w_info->rows; ++ n_columns = w_info->cols; ++ n_rows = w_info->rows; + g_free (w_info); + +- int new_index = workspace_index; ++ new_index = workspace_index; + +- WnckWorkspace *new_workspace; +- + if (event->type != GDK_SCROLL) + return FALSE; + +@@ -1270,10 +1275,11 @@ + pager_show (Brightside *brightside, WnckWorkspace *workspace, + int n_rows, gboolean from_scroll) + { ++ GtkWidget *label; + #ifdef DEBUG + g_print("pager_show %d %d\n", n_rows, from_scroll); + #endif +- GtkWidget *label = glade_xml_get_widget (brightside->xml, ++ label = glade_xml_get_widget (brightside->xml, + "workspace_label"); + gtk_label_set_text (GTK_LABEL (label), + wnck_workspace_get_name (workspace)); +@@ -1298,10 +1304,11 @@ + gboolean + pager_enter_leave (GtkWidget *widget, GdkEventCrossing *event, gpointer data) + { ++ Brightside *brightside; + #ifdef DEBUG + g_print("pager_enter_leave %d %d\n", event->type, event->detail); + #endif +- Brightside *brightside = (Brightside *) data; ++ brightside = (Brightside *) data; + if (event->type == GDK_LEAVE_NOTIFY && + event->detail != GDK_NOTIFY_INFERIOR) + gtk_widget_hide (brightside->pager); +@@ -1315,7 +1322,16 @@ + static void + do_edge_flip (Brightside *brightside, gint edge) /* or corner flip, now */ + { +- int i; ++ int i, workspaces, current, cols, rows, original; ++ int new_space = 0; ++ gint starting_corner; ++ gboolean have_wrapped = FALSE; ++ gint wrapped_point = 0; ++ Display *xdisplay; ++ gboolean vertical_workspaces; ++ WnckWorkspace *new_workspace; ++ GdkScreen *screen; ++ gint oldx, oldy, x, y; + + #ifdef DEBUG + g_print ("Request edge flip: edge is %d\n", edge); +@@ -1325,12 +1341,12 @@ + g_free (w_info); + return; + } +- int workspaces = w_info->workspaces; +- int current = w_info->current; +- gboolean vertical_workspaces = w_info->vertical_workspaces; +- gint starting_corner = w_info->starting_corner; +- int cols = w_info->cols; +- int rows = w_info->rows; ++ workspaces = w_info->workspaces; ++ current = w_info->current; ++ vertical_workspaces = w_info->vertical_workspaces; ++ starting_corner = w_info->starting_corner; ++ cols = w_info->cols; ++ rows = w_info->rows; + g_free (w_info); + g_return_if_fail (workspaces > 0); + #ifdef DEBUG +@@ -1343,12 +1359,9 @@ + brightside->settings.orientable_workspaces ?"":" not", + brightside->settings.edge_wrap ? "" : " not"); + #endif +- int original = current; ++ original = current; + +- int new_space = 0; +- gboolean have_wrapped = FALSE; +- gint wrapped_point = 0; +- Display *xdisplay = gdk_x11_display_get_xdisplay (brightside->display); ++ xdisplay = gdk_x11_display_get_xdisplay (brightside->display); + + #if 0 + Window xmoving = None; +@@ -1383,11 +1396,12 @@ + /* In order to handle gaps in the workspace layout: loop at most + * workspaces times */ + for (i = 0; i < workspaces; ++i) { ++ gint current_row; + gint current_col = vertical_workspaces + ? current / rows : current % cols; + if (starting_corner == NE || starting_corner == SE) + current_col = (cols - 1) - current_col; +- gint current_row = vertical_workspaces ++ current_row = vertical_workspaces + ? current % rows : current / cols; + if (starting_corner == SW || starting_corner == SE) + current_row = rows - 1 - current_row; +@@ -1507,14 +1521,12 @@ + #endif + } + +- WnckWorkspace *new_workspace = wnck_screen_get_workspace ( ++ new_workspace = wnck_screen_get_workspace ( + brightside->screen, new_space); + wnck_workspace_activate (new_workspace); + + pager_show (brightside, new_workspace, rows, FALSE); + +- GdkScreen *screen; +- gint oldx, oldy, x, y; + gdk_display_get_pointer (brightside->display, &screen, + &oldx, &oldy, NULL); + x = gdk_screen_get_width(screen); +@@ -1688,10 +1700,11 @@ + } else if (brightside->region_at == region) { + /* Still in a region not yet triggered */ + GTimeVal time_now; ++ glong elapsed_msec, delay; + g_get_current_time (&time_now); +- glong elapsed_msec = TIMEVAL_ELAPSED_MSEC (time_now, ++ elapsed_msec = TIMEVAL_ELAPSED_MSEC (time_now, + brightside->time_region_entered); +- glong delay = REGION_IS_CORNER (region) ++ delay = REGION_IS_CORNER (region) + ? brightside->settings.corner_delay + : brightside->settings.edge_delay; + /* Check if it's time to trigger the region */ +@@ -1732,10 +1745,11 @@ + && brightside->settings.corner_flip) || + brightside->settings.edge_flip) { + GTimeVal time_now; ++ glong elapsed_msec, delay; + g_get_current_time (&time_now); +- glong elapsed_msec = TIMEVAL_ELAPSED_MSEC (time_now, ++ elapsed_msec = TIMEVAL_ELAPSED_MSEC (time_now, + brightside->time_edge_flipped); +- glong delay = 2 * MAX ( ++ delay = 2 * MAX ( + brightside->settings.corner_flip ? + brightside->settings.corner_delay : 0, + brightside->settings.edge_flip ? +@@ -1774,14 +1788,14 @@ + if (!have_just_flipped && + !REGION_CORNER_TO_ADJACENT_EDGE ( + brightside->region_at, region)) { ++ gchar gesture [REGION_GESTURE_HISTORY + 1]; ++ gchar *gesture_found; + for (i = 1; i < REGION_GESTURE_HISTORY; ++i) + brightside->gesture_history[i-1] = + brightside->gesture_history[i]; + brightside->gesture_history[i-1].region = region; + brightside->gesture_history[i-1].time_region_entered = + brightside->time_region_entered; +- gchar gesture [REGION_GESTURE_HISTORY + 1]; +- gchar *gesture_found; + for (i = 0; i < REGION_GESTURE_HISTORY; ++i) + gesture[i] = + (brightside->gesture_history[i].region +@@ -1795,12 +1809,13 @@ + #endif + if ((gesture_found = g_strrstr (gesture, + EASTER_EGG_GESTURE))) { ++ glong elapsed_msec, delay; + i = (gint) (gesture_found - gesture); +- glong elapsed_msec = TIMEVAL_ELAPSED_MSEC ( ++ elapsed_msec = TIMEVAL_ELAPSED_MSEC ( + brightside->time_region_entered, + brightside->gesture_history[i] + .time_region_entered); +- glong delay = MAX ( ++ delay = MAX ( + brightside->settings.corner_delay, + brightside->settings.edge_delay) + * 6; +@@ -1842,11 +1857,6 @@ + main (int argc, char *argv[]) + { + Brightside *brightside; +- +- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); +- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); +- textdomain (GETTEXT_PACKAGE); +- + GnomeProgram *brightside_program = NULL; + gboolean show_pager = FALSE, show_version = FALSE; + struct poptOption cmd_options_table[] = { +@@ -1855,6 +1865,11 @@ + {"version", 'v', POPT_ARG_NONE, &show_version, 0, + _("Show the version of brightside"), NULL}, + {0}}; ++ ++ bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); ++ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); ++ textdomain (GETTEXT_PACKAGE); ++ + + brightside_program = gnome_program_init ("brightside", VERSION, + LIBGNOMEUI_MODULE, diff --git a/x11/brightside/pkg-descr b/x11/brightside/pkg-descr new file mode 100644 index 000000000000..92a0d84e530c --- /dev/null +++ b/x11/brightside/pkg-descr @@ -0,0 +1,12 @@ +Brightside is a tool to add reactivity to the corners and edges of your GNOME +desktop. + +Brightside provides edge flipping to allow you to switch to the adjacent +workspace simply by pressing your mouse against the edge of the screen. + +Brightside also allows you to assign configurable actions to occur while you +rest the mouse in a corner of the screen. + +-- Brightside Homepage + +WWW: http://home.jesus.ox.ac.uk/~ecatmur/brightside/ diff --git a/x11/brightside/pkg-plist b/x11/brightside/pkg-plist new file mode 100644 index 000000000000..dd11f2686058 --- /dev/null +++ b/x11/brightside/pkg-plist @@ -0,0 +1,72 @@ +bin/brightside +bin/brightside-properties +@unexec env GCONF_CONFIG_SOURCE=xml::%D/etc/gconf/gconf.xml.defaults gconftool-2 --makefile-uninstall-rule %D/etc/gconf/schemas/brightside.schemas > /dev/null || /usr/bin/true +etc/gconf/schemas/brightside.schemas +@exec env GCONF_CONFIG_SOURCE=xml::%D/etc/gconf/gconf.xml.defaults gconftool-2 --makefile-install-rule %D/etc/gconf/schemas/brightside.schemas > /dev/null || /usr/bin/true +share/gnome/brightside/brightside-16.png +share/gnome/brightside/brightside-48.png +share/gnome/brightside/brightside-brightness.png +share/gnome/brightside/brightside-properties.glade +share/gnome/brightside/brightside.glade +share/gnome/brightside/brightside.svg +share/gnome/brightside/custom-action.glade +share/gnome/brightside/dpms.png +share/gnome/brightside/gnome-lockscreen.png +share/gnome/brightside/gnome-speakernotes-muted.png +share/gnome/brightside/gnome-speakernotes.png +share/gnome/brightside/xscreensaver.png +share/gnome/control-center-2.0/capplets/brightside.desktop +share/gnome/pixmaps/brightside-48.png +share/locale/am/LC_MESSAGES/Brightside.mo +share/locale/ar/LC_MESSAGES/Brightside.mo +share/locale/az/LC_MESSAGES/Brightside.mo +share/locale/be/LC_MESSAGES/Brightside.mo +share/locale/bg/LC_MESSAGES/Brightside.mo +share/locale/bn/LC_MESSAGES/Brightside.mo +share/locale/ca/LC_MESSAGES/Brightside.mo +share/locale/cs/LC_MESSAGES/Brightside.mo +share/locale/cy/LC_MESSAGES/Brightside.mo +share/locale/da/LC_MESSAGES/Brightside.mo +share/locale/de/LC_MESSAGES/Brightside.mo +share/locale/el/LC_MESSAGES/Brightside.mo +share/locale/es/LC_MESSAGES/Brightside.mo +share/locale/et/LC_MESSAGES/Brightside.mo +share/locale/eu/LC_MESSAGES/Brightside.mo +share/locale/fa/LC_MESSAGES/Brightside.mo +share/locale/fi/LC_MESSAGES/Brightside.mo +share/locale/fr/LC_MESSAGES/Brightside.mo +share/locale/ga/LC_MESSAGES/Brightside.mo +share/locale/he/LC_MESSAGES/Brightside.mo +share/locale/hi/LC_MESSAGES/Brightside.mo +share/locale/hu/LC_MESSAGES/Brightside.mo +share/locale/id/LC_MESSAGES/Brightside.mo +share/locale/is/LC_MESSAGES/Brightside.mo +share/locale/it/LC_MESSAGES/Brightside.mo +share/locale/ja/LC_MESSAGES/Brightside.mo +share/locale/ko/LC_MESSAGES/Brightside.mo +share/locale/li/LC_MESSAGES/Brightside.mo +share/locale/lt/LC_MESSAGES/Brightside.mo +share/locale/lv/LC_MESSAGES/Brightside.mo +share/locale/mk/LC_MESSAGES/Brightside.mo +share/locale/ml/LC_MESSAGES/Brightside.mo +share/locale/mn/LC_MESSAGES/Brightside.mo +share/locale/ms/LC_MESSAGES/Brightside.mo +share/locale/nl/LC_MESSAGES/Brightside.mo +share/locale/no/LC_MESSAGES/Brightside.mo +share/locale/pl/LC_MESSAGES/Brightside.mo +share/locale/pt/LC_MESSAGES/Brightside.mo +share/locale/pt_BR/LC_MESSAGES/Brightside.mo +share/locale/ro/LC_MESSAGES/Brightside.mo +share/locale/ru/LC_MESSAGES/Brightside.mo +share/locale/sk/LC_MESSAGES/Brightside.mo +share/locale/sl/LC_MESSAGES/Brightside.mo +share/locale/sq/LC_MESSAGES/Brightside.mo +share/locale/sr/LC_MESSAGES/Brightside.mo +share/locale/sr@Latn/LC_MESSAGES/Brightside.mo +share/locale/sv/LC_MESSAGES/Brightside.mo +share/locale/tr/LC_MESSAGES/Brightside.mo +share/locale/uk/LC_MESSAGES/Brightside.mo +share/locale/vi/LC_MESSAGES/Brightside.mo +share/locale/zh_CN/LC_MESSAGES/Brightside.mo +share/locale/zh_TW/LC_MESSAGES/Brightside.mo +@dirrm share/gnome/brightside |