Initial git release
[connectnow-hp] / src / connectnow-settings-dialog.h
1 /*
2  *  connectnow home widget for the maemo desktop.
3  *  Copyright (C) 2010 Nicolai Hess
4  *  
5  *  This program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2 of the License, or
8  *  (at your option) any later version.
9  *  
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *  
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program; if not, write to the Free Software
17  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  */
19 #ifndef CONNECTNOW_SETTINGS_DIALOG_H
20 #define CONNECTNOW_SETTINGS_DIALOG_H
21 #include <gtk/gtk.h>
22
23 static const int NUM_PREDEFINED_ICONS = 8;
24 static const int CONNECT = 0;
25 static const int DISCONNECT = 1;
26 static const int LABEL = 2;
27
28 static const gchar* _predefined_icons[][3] =
29 {
30   {"connectnow_general_connected", "connectnow_general_disconnected", "General"},
31   {"connectnow_gprs_connected_net", "connectnow_gprs_disconnected_net", "Net"},
32   {"connectnow_gprs_connected_mms", "connectnow_gprs_disconnected_mms", "MMS"},
33   {"connectnow_wifi_connected_home", "connectnow_wifi_disconnected_home", "Home"},
34   {"connectnow_wifi_connected_work", "connectnow_wifi_disconnected_work", "Work"},
35   {"connectnow_usb_connected", "connectnow_usb_disconnected", "USB"},
36   {"connectnow_bt_connected", "connectnow_bt_disconnected", "Bluetooth"}
37 };
38
39 typedef struct _icon_data icon_data_t;
40
41 struct _icon_data
42 {
43   GtkWidget* connect_icon;
44   GtkWidget* disconnect_icon;
45   gchar* connect_name;
46   gchar* disconnect_name;
47 };
48
49 typedef struct _custom_icon custom_icon_data;
50
51 struct _custom_icon
52 {
53   GtkWidget* icon_button;
54   gchar* icon_name;
55 };
56
57 void
58 select_and_set_icon(GtkButton* button, custom_icon_data* data);
59 void
60 connect_now_show_icon_selector(GtkButton* button, icon_data_t* icon_data);
61 #endif