commit
277f27d25c
20
termite.c
20
termite.c
|
@ -10,6 +10,13 @@
|
||||||
# define __attribute__(x)
|
# define __attribute__(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static gchar *role = NULL;
|
||||||
|
|
||||||
|
static GOptionEntry entries[] = {
|
||||||
|
{ "role", 'r', 0, G_OPTION_ARG_STRING, &role, "The role to use", "ROLE" },
|
||||||
|
{ NULL }
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct search_dialog_info {
|
typedef struct search_dialog_info {
|
||||||
GtkWidget *vte;
|
GtkWidget *vte;
|
||||||
GtkWidget *entry;
|
GtkWidget *entry;
|
||||||
|
@ -163,12 +170,23 @@ static void window_title_cb(VteTerminal *vte, GtkWindow *window) {
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
GOptionContext *context = g_option_context_new("[COMMAND]");
|
||||||
|
|
||||||
gtk_init(&argc, &argv);
|
g_option_context_add_main_entries(context, entries, NULL);
|
||||||
|
g_option_context_add_group(context, gtk_get_option_group (TRUE));
|
||||||
|
|
||||||
|
if (!g_option_context_parse(context, &argc, &argv, &error)) {
|
||||||
|
g_print("option parsing failed: %s\n", error->message);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||||
/*gtk_window_set_default_size(GTK_WINDOW(window), 400, 400);*/
|
/*gtk_window_set_default_size(GTK_WINDOW(window), 400, 400);*/
|
||||||
|
|
||||||
|
if (role) {
|
||||||
|
gtk_window_set_role(GTK_WINDOW(window), role);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef ICON_NAME
|
#ifdef ICON_NAME
|
||||||
GdkPixbuf *icon = gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), ICON_NAME, 48, 0, NULL);
|
GdkPixbuf *icon = gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), ICON_NAME, 48, 0, NULL);
|
||||||
if (icon) {
|
if (icon) {
|
||||||
|
|
Loading…
Reference in New Issue