Mercurial > geeqie
comparison src/layout.c @ 288:d1f74154463e
Replace occurences of Geeqie / geeqie by constants defined in main.h.
author | zas_ |
---|---|
date | Wed, 09 Apr 2008 13:53:01 +0000 |
parents | 9995c5fb202a |
children | 6a7298988a7a |
comparison
equal
deleted
inserted
replaced
287:fd5c62403498 | 288:d1f74154463e |
---|---|
371 return g_strdelimit(g_strdup(name), "_", '-'); | 371 return g_strdelimit(g_strdup(name), "_", '-'); |
372 } | 372 } |
373 | 373 |
374 static void layout_color_button_press_cb(GtkWidget *widget, gpointer data) | 374 static void layout_color_button_press_cb(GtkWidget *widget, gpointer data) |
375 { | 375 { |
376 #ifndef HAVE_LCMS | |
377 gchar *msg = g_strdup_printf(_("This installation of %s was not built with support for color profiles."), GQ_APPNAME); | |
378 file_util_warning_dialog(_("Color profiles not supported"), | |
379 msg, | |
380 GTK_STOCK_DIALOG_INFO, widget); | |
381 g_free(msg); | |
382 return; | |
383 #else | |
376 LayoutWindow *lw = data; | 384 LayoutWindow *lw = data; |
377 GtkWidget *menu; | 385 GtkWidget *menu; |
378 GtkWidget *item; | 386 GtkWidget *item; |
379 gchar *buf; | 387 gchar *buf; |
380 gchar *front; | 388 gchar *front; |
383 gint input = 0; | 391 gint input = 0; |
384 gint screen = 0; | 392 gint screen = 0; |
385 gint use_image = 0; | 393 gint use_image = 0; |
386 gint i; | 394 gint i; |
387 | 395 |
388 #ifndef HAVE_LCMS | |
389 file_util_warning_dialog(_("Color profiles not supported"), | |
390 _("This installation of Geeqie was not built with support for color profiles."), | |
391 GTK_STOCK_DIALOG_INFO, widget); | |
392 return; | |
393 #endif | |
394 | |
395 if (!layout_image_color_profile_get(lw, &input, &screen, &use_image)) return; | 396 if (!layout_image_color_profile_get(lw, &input, &screen, &use_image)) return; |
396 | 397 |
397 menu = popup_menu_short_lived(); | 398 menu = popup_menu_short_lived(); |
398 | 399 |
399 active = layout_image_color_profile_get_use(lw); | 400 active = layout_image_color_profile_get_use(lw); |
452 G_CALLBACK(layout_color_menu_screen_cb), lw); | 453 G_CALLBACK(layout_color_menu_screen_cb), lw); |
453 g_object_set_data(G_OBJECT(item), COLOR_MENU_KEY, GINT_TO_POINTER(1)); | 454 g_object_set_data(G_OBJECT(item), COLOR_MENU_KEY, GINT_TO_POINTER(1)); |
454 gtk_widget_set_sensitive(item, active && color_profile_screen_file); | 455 gtk_widget_set_sensitive(item, active && color_profile_screen_file); |
455 | 456 |
456 gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 0, GDK_CURRENT_TIME); | 457 gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 0, GDK_CURRENT_TIME); |
458 #endif /* HAVE_LCMS */ | |
457 } | 459 } |
458 | 460 |
459 static GtkWidget *layout_color_button(LayoutWindow *lw) | 461 static GtkWidget *layout_color_button(LayoutWindow *lw) |
460 { | 462 { |
461 GtkWidget *button; | 463 GtkWidget *button; |
1336 gtk_window_set_geometry_hints(GTK_WINDOW(lw->tools), NULL, &geometry, | 1338 gtk_window_set_geometry_hints(GTK_WINDOW(lw->tools), NULL, &geometry, |
1337 GDK_HINT_MIN_SIZE | GDK_HINT_BASE_SIZE | hints); | 1339 GDK_HINT_MIN_SIZE | GDK_HINT_BASE_SIZE | hints); |
1338 | 1340 |
1339 | 1341 |
1340 gtk_window_set_resizable(GTK_WINDOW(lw->tools), TRUE); | 1342 gtk_window_set_resizable(GTK_WINDOW(lw->tools), TRUE); |
1341 gtk_window_set_title(GTK_WINDOW(lw->tools), _("Geeqie Tools")); | 1343 { |
1344 gchar *title = g_strdup_printf("%s - %s", _("Tools"), GQ_APPNAME); | |
1345 gtk_window_set_title(GTK_WINDOW(lw->tools), title); | |
1346 g_free(title); | |
1347 } | |
1342 gtk_window_set_wmclass(GTK_WINDOW(lw->tools), "tools", GQ_WMCLASS); | 1348 gtk_window_set_wmclass(GTK_WINDOW(lw->tools), "tools", GQ_WMCLASS); |
1343 gtk_container_set_border_width(GTK_CONTAINER(lw->tools), 0); | 1349 gtk_container_set_border_width(GTK_CONTAINER(lw->tools), 0); |
1344 | 1350 |
1345 window_set_icon(lw->tools, PIXBUF_INLINE_ICON_TOOLS, NULL); | 1351 window_set_icon(lw->tools, PIXBUF_INLINE_ICON_TOOLS, NULL); |
1346 | 1352 |
1925 /* window */ | 1931 /* window */ |
1926 | 1932 |
1927 lw->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); | 1933 lw->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
1928 gtk_window_set_resizable(GTK_WINDOW(lw->window), TRUE); | 1934 gtk_window_set_resizable(GTK_WINDOW(lw->window), TRUE); |
1929 | 1935 |
1930 gtk_window_set_title(GTK_WINDOW(lw->window), "Geeqie"); | 1936 gtk_window_set_title(GTK_WINDOW(lw->window), GQ_APPNAME); |
1931 gtk_window_set_wmclass(GTK_WINDOW(lw->window), GQ_WMCLASS, GQ_WMCLASS); | 1937 gtk_window_set_wmclass(GTK_WINDOW(lw->window), GQ_WMCLASS, GQ_WMCLASS); |
1932 gtk_container_set_border_width(GTK_CONTAINER(lw->window), 0); | 1938 gtk_container_set_border_width(GTK_CONTAINER(lw->window), 0); |
1933 | 1939 |
1934 window_set_icon(lw->window, NULL, NULL); | 1940 window_set_icon(lw->window, NULL, NULL); |
1935 | 1941 |