Logo Search packages:      
Sourcecode: dcgui version File versions  Download package

interface.c

/*
 * DO NOT EDIT THIS FILE - it is generated by Glade.
 */

#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif

#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>

#include <bonobo.h>
#include <gnome.h>

#include "callbacks.h"
#include "interface.h"
#include "support.h"

#define GLADE_HOOKUP_OBJECT(component,widget,name) \
  g_object_set_data_full (G_OBJECT (component), name, \
    gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)

#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
  g_object_set_data (G_OBJECT (component), name, widget)

GtkWidget*
create_app1 (void)
{
  GtkWidget *app1;
  GtkWidget *scrolledwindow1;
  GtkWidget *unattached_gdl_treeview;

  app1 = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (app1), _("Unattached GDLs"));

  scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrolledwindow1);
  gtk_container_add (GTK_CONTAINER (app1), scrolledwindow1);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_SHADOW_IN);

  unattached_gdl_treeview = gtk_tree_view_new ();
  gtk_widget_show (unattached_gdl_treeview);
  gtk_container_add (GTK_CONTAINER (scrolledwindow1), unattached_gdl_treeview);

  g_signal_connect ((gpointer) app1, "delete_event",
                    G_CALLBACK (on_app1_delete_event),
                    NULL);
  g_signal_connect ((gpointer) unattached_gdl_treeview, "button_press_event",
                    G_CALLBACK (on_unattached_gdl_treeview_button_press_event),
                    NULL);
  g_signal_connect ((gpointer) unattached_gdl_treeview, "key_press_event",
                    G_CALLBACK (on_unattached_gdl_treeview_key_press_event),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (app1, app1, "app1");
  GLADE_HOOKUP_OBJECT (app1, scrolledwindow1, "scrolledwindow1");
  GLADE_HOOKUP_OBJECT (app1, unattached_gdl_treeview, "unattached_gdl_treeview");

  return app1;
}

static GnomeUIInfo uatgdl_popup_menu_uiinfo[] =
{
  {
    GNOME_APP_UI_ITEM, N_("_Attach GDLs"),
    NULL,
    (gpointer) on_add_uatgdl_item_activate, NULL, NULL,
    GNOME_APP_PIXMAP_STOCK, "gtk-jump-to",
    GDK_a, (GdkModifierType) 0, NULL
  },
  {
    GNOME_APP_UI_ITEM, N_("_Refresh list"),
    NULL,
    (gpointer) on_refresh_uatgdl_activate, NULL, NULL,
    GNOME_APP_PIXMAP_STOCK, "gtk-refresh",
    GDK_r, (GdkModifierType) 0, NULL
  },
  GNOMEUIINFO_SEPARATOR,
  {
    GNOME_APP_UI_ITEM, N_("_Delete selected GDLs"),
    NULL,
    (gpointer) on_delete_selected_gdls_activate, NULL, NULL,
    GNOME_APP_PIXMAP_STOCK, "gtk-delete",
    GDK_d, (GdkModifierType) 0, NULL
  },
  GNOMEUIINFO_END
};

GtkWidget*
create_uatgdl_popup_menu (void)
{
  GtkWidget *uatgdl_popup_menu;

  uatgdl_popup_menu = gtk_menu_new ();
  gnome_app_fill_menu (GTK_MENU_SHELL (uatgdl_popup_menu), uatgdl_popup_menu_uiinfo,
                       NULL, FALSE, 0);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (uatgdl_popup_menu, uatgdl_popup_menu, "uatgdl_popup_menu");
  GLADE_HOOKUP_OBJECT (uatgdl_popup_menu, uatgdl_popup_menu_uiinfo[0].widget, "add_uatgdl_item");
  GLADE_HOOKUP_OBJECT (uatgdl_popup_menu, uatgdl_popup_menu_uiinfo[1].widget, "refresh_uatgdl");
  GLADE_HOOKUP_OBJECT (uatgdl_popup_menu, uatgdl_popup_menu_uiinfo[2].widget, "separator1");
  GLADE_HOOKUP_OBJECT (uatgdl_popup_menu, uatgdl_popup_menu_uiinfo[3].widget, "delete_selected_gdls");

  return uatgdl_popup_menu;
}


Generated by  Doxygen 1.6.0   Back to index