~kroq-gar78/ubuntu/precise/gnome-control-center/fix-885947

« back to all changes in this revision

Viewing changes to libslab/app-shell.h

  • Committer: Bazaar Package Importer
  • Author(s): Rodrigo Moya
  • Date: 2011-05-17 10:47:27 UTC
  • mfrom: (0.1.11 experimental) (1.1.45 upstream)
  • Revision ID: james.westby@ubuntu.com-20110517104727-lqel6m8vhfw5jby1
Tags: 1:3.0.1.1-1ubuntu1
* Rebase on Debian, remaining Ubuntu changes:
* debian/control:
  - Build-Depend on hardening-wrapper, dpkg-dev and dh-autoreconf
  - Add dependency on ubuntu-system-service
  - Remove dependency on gnome-icon-theme-symbolic
  - Move dependency on apg, gnome-icon-theme-symbolic and accountsservice to
    be a Recommends: until we get them in main
* debian/rules:
  - Use autoreconf
  - Add binary-post-install rule for gnome-control-center-data
  - Run dh-autoreconf
* debian/gnome-control-center.dirs:
* debian/gnome-control-center.links:
  - Add a link to the control center shell for indicators
* debian/patches/00_disable-nm.patch:
  - Temporary patch to disable building with NetworkManager until we get
    the new one in the archive
* debian/patches/01_git_remove_gettext_calls.patch:
  - Remove calls to AM_GNU_GETTEXT, IT_PROG_INTLTOOL should be enough
* debian/patches/01_git_kill_warning.patch:
  - Kill warning
* debian/patches/50_ubuntu_systemwide_prefs.patch:
  - Ubuntu specific proxy preferences
* debian/patches/51_ubuntu_system_keyboard.patch:
  - Implement the global keyboard spec at https://wiki.ubuntu.com/DefaultKeyboardSettings

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * This file is part of libslab.
3
 
 *
4
 
 * Copyright (c) 2006 Novell, Inc.
5
 
 *
6
 
 * Libslab is free software; you can redistribute it and/or modify it under the
7
 
 * terms of the GNU Lesser General Public License as published by the Free
8
 
 * Software Foundation; either version 2 of the License, or (at your option)
9
 
 * any later version.
10
 
 *
11
 
 * Libslab is distributed in the hope that it will be useful, but WITHOUT ANY
12
 
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
 
 * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
14
 
 * more details.
15
 
 *
16
 
 * You should have received a copy of the GNU Lesser General Public License
17
 
 * along with libslab; if not, write to the Free Software Foundation, Inc., 51
18
 
 * Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
 
 */
20
 
 
21
 
#ifndef __APP_SHELL_H__
22
 
#define __APP_SHELL_H__
23
 
 
24
 
#include <glib.h>
25
 
#include <gtk/gtk.h>
26
 
#define GMENU_I_KNOW_THIS_IS_UNSTABLE
27
 
#include <gmenu-tree.h>
28
 
#include <libgnome/gnome-desktop-item.h>
29
 
 
30
 
#include <libslab/slab-section.h>
31
 
#include <libslab/tile.h>
32
 
 
33
 
G_BEGIN_DECLS
34
 
 
35
 
#define CATEGORY_SPACING 0
36
 
#define GROUP_POSITION_NUMBER_KEY "Unique Group Position Number"
37
 
#define APP_ACTION_KEY  "Unique Application Action Key"
38
 
 
39
 
/* constants for initial sizing */
40
 
#define SIZING_SCREEN_WIDTH_LARGE  1024
41
 
#define SIZING_SCREEN_WIDTH_MEDIUM 800
42
 
#define SIZING_SCREEN_WIDTH_SMALL  640
43
 
#define SIZING_SCREEN_WIDTH_LARGE_NUMCOLS  3
44
 
#define SIZING_SCREEN_WIDTH_MEDIUM_NUMCOLS 2
45
 
#define SIZING_SCREEN_WIDTH_SMALL_NUMCOLS  1
46
 
#define SIZING_TILE_WIDTH 230
47
 
#define SIZING_HEIGHT_PERCENT 0.8
48
 
 
49
 
typedef struct
50
 
{
51
 
        const gchar *name;
52
 
        gint max_items;
53
 
        GArray *garray;
54
 
} NewAppConfig;
55
 
 
56
 
typedef struct _AppShellData
57
 
{
58
 
        GtkWidget *main_app;
59
 
        gint main_app_window_x;
60
 
        gint main_app_window_y;
61
 
        gboolean main_app_window_shown_once;
62
 
 
63
 
        GtkWidget *shell;
64
 
        GtkWidget *groups_section;
65
 
 
66
 
        GtkWidget *actions_section;
67
 
        /*
68
 
                NULL      - if the available actions depend on the current tile selected
69
 
                NON-NULL  - a list of AppAction that are always shown
70
 
        */
71
 
        GSList *static_actions;
72
 
 
73
 
        GtkWidget *filter_section;
74
 
        gchar *filter_string;
75
 
        GdkCursor *busy_cursor;
76
 
 
77
 
        GtkWidget *category_layout;
78
 
        GList *categories_list;
79
 
        GList *cached_tables_list;      /* list of currently showing (not filtered out) tables */
80
 
        Tile *last_clicked_launcher;
81
 
        SlabSection *selected_group;
82
 
        GtkIconSize icon_size;
83
 
        const gchar *gconf_prefix;
84
 
        const gchar *menu_name;
85
 
        NewAppConfig *new_apps;
86
 
        GMenuTree *tree;
87
 
        GHashTable *hash;
88
 
 
89
 
        guint filter_changed_timeout;
90
 
        gboolean stop_incremental_relayout;
91
 
        GList *incremental_relayout_cat_list;
92
 
        gboolean filtered_out_everything;
93
 
        GtkWidget *filtered_out_everything_widget;
94
 
        GtkLabel *filtered_out_everything_widget_label;
95
 
 
96
 
        gboolean show_tile_generic_name;
97
 
        gboolean exit_on_close;
98
 
} AppShellData;
99
 
 
100
 
typedef struct
101
 
{
102
 
        gchar *category;
103
 
        Tile *group_launcher;
104
 
 
105
 
        SlabSection *section;
106
 
        GList *launcher_list;
107
 
        GList *filtered_launcher_list;
108
 
} CategoryData;
109
 
 
110
 
typedef struct
111
 
{
112
 
        const gchar *name;
113
 
        GnomeDesktopItem *item;
114
 
} AppAction;
115
 
 
116
 
typedef struct
117
 
{
118
 
        long time;
119
 
        GnomeDesktopItem *item;
120
 
} NewAppData;
121
 
 
122
 
void generate_categories (AppShellData * app_data);
123
 
 
124
 
/* If new_apps is NULL then the new applications category is not created */
125
 
AppShellData *appshelldata_new (const gchar * menu_name, NewAppConfig * new_apps,
126
 
        const gchar * gconf_keys_prefix, GtkIconSize icon_size,
127
 
        gboolean show_tile_generic_name, gboolean exit_on_close);
128
 
 
129
 
void layout_shell (AppShellData * app_data, const gchar * filter_title, const gchar * groups_title,
130
 
        const gchar * actions_title, GSList * actions,
131
 
        void (*actions_handler) (Tile *, TileEvent *, gpointer));
132
 
 
133
 
gboolean create_main_window (AppShellData * app_data, const gchar * app_name, const gchar * title,
134
 
        const gchar * window_icon, gint width, gint height, gboolean hidden);
135
 
 
136
 
void hide_shell (AppShellData * app_data);
137
 
 
138
 
void show_shell (AppShellData * app_data);
139
 
 
140
 
G_END_DECLS
141
 
#endif /* __APP_SHELL_H__ */