Exemple #1
0
static gboolean
trash_applet_key_press (GtkWidget   *widget,
                        GdkEventKey *event)
{
  TrashApplet *applet = TRASH_APPLET (widget);

  switch (event->keyval)
    {
     case GDK_KEY_KP_Enter:
     case GDK_KEY_ISO_Enter:
     case GDK_KEY_3270_Enter:
     case GDK_KEY_Return:
     case GDK_KEY_space:
     case GDK_KEY_KP_Space:
      trash_applet_open_folder (NULL, NULL, applet);
      return TRUE;

     default:
      break;
    }

  if (GTK_WIDGET_CLASS (trash_applet_parent_class)->key_press_event)
    return GTK_WIDGET_CLASS (trash_applet_parent_class)
      ->key_press_event (widget, event);
  else
    return FALSE;
}
Exemple #2
0
static gboolean
trash_applet_button_release (GtkWidget      *widget,
                             GdkEventButton *event)
{
  TrashApplet *applet = TRASH_APPLET (widget);
  static GConfClient *client;

  if (client == NULL)
    client = gconf_client_get_default ();

  if (event->button == 1)
    {
      if (gconf_client_get_bool (client, PANEL_ENABLE_ANIMATIONS, NULL))
        xstuff_zoom_animate (widget, NULL);

      trash_applet_open_folder (NULL, applet);

      return TRUE;
    }

  if (GTK_WIDGET_CLASS (trash_applet_parent_class)->button_release_event)
    return GTK_WIDGET_CLASS (trash_applet_parent_class)
        ->button_release_event (widget, event);
  else
    return FALSE;
}
Exemple #3
0
static gboolean
trash_applet_button_release (GtkWidget      *widget,
                             GdkEventButton *event)
{
  TrashApplet *applet = TRASH_APPLET (widget);
  static GSettings *settings;

  if (settings == NULL)
    settings = g_settings_new (PANEL_SCHEMA);

  if (event->button == 1)
    {
      if (g_settings_get_boolean (settings, PANEL_ENABLE_ANIMATIONS))
        xstuff_zoom_animate (widget, NULL);

      trash_applet_open_folder (NULL, applet);

      return TRUE;
    }

  if (GTK_WIDGET_CLASS (trash_applet_parent_class)->button_release_event)
    return GTK_WIDGET_CLASS (trash_applet_parent_class)
        ->button_release_event (widget, event);
  else
    return FALSE;
}
Exemple #4
0
static gboolean
trash_applet_button_release (GtkWidget      *widget,
                             GdkEventButton *event)
{
  TrashApplet *applet = TRASH_APPLET (widget);

  if (event->button == 1)
    {
      trash_applet_open_folder (NULL, NULL, applet);

      return TRUE;
    }

  if (GTK_WIDGET_CLASS (trash_applet_parent_class)->button_release_event)
    return GTK_WIDGET_CLASS (trash_applet_parent_class)
        ->button_release_event (widget, event);
  else
    return FALSE;
}
static void
open_trash (GtkMenuItem *item, TrashApplet *applet)
{
	trash_applet_open_folder (applet);
}