[PATCH] To let resize the gnome panel by scrolling with the mouse
- From: Jean Schurger <gnome schurger org>
- To: desktop list <desktop-devel-list gnome org>
- Subject: [PATCH] To let resize the gnome panel by scrolling with the mouse
- Date: 30 Jun 2003 10:06:18 +0200
I, i post a little patch to the gnome-panel [HEAD] that let
change the size just with the scroll-buttons of the mouse.
Jean.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-panel/ChangeLog,v
retrieving revision 1.551
diff -r1.551 ChangeLog
0a1,4
> 2003-06-30 Jean Schurger <yshark schurger org>
>
> * gnome-panel/panel.c: allow resizing panel with the scroll mouse
>
Index: gnome-panel/panel.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel.c,v
retrieving revision 1.517
diff -r1.517 panel.c
394a395,421
> panel_scroll_event (PanelToplevel *toplevel,
> GdkEvent *event, gpointer data) {
> int cur_size = panel_profile_get_toplevel_size(toplevel);
>
> switch(event->scroll.direction) {
> case GDK_SCROLL_UP:
> cur_size += 1;
> break;
> case GDK_SCROLL_DOWN:
> cur_size -= 1;
> break;
> case GDK_SCROLL_LEFT:
> case GDK_SCROLL_RIGHT:
> break;
> }
>
> if (cur_size < 12)
> cur_size = 12;
> if (cur_size > 120)
> cur_size = 120;
>
> panel_profile_set_toplevel_size(toplevel, cur_size);
> return FALSE;
> }
>
>
> static gboolean
1067a1095,1096
> g_signal_connect (toplevel, "scroll_event",
> G_CALLBACK (panel_scroll_event), NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]