* gnoemoe/gm-support.c: fixed the tab close button
* gnoemoe/gm-pixbuf.c: fixed warning on creating save close button
This commit is contained in:
parent
62b7cbc8cb
commit
4084be6076
|
@ -26,7 +26,7 @@ gm_pixbuf_create_save_close() {
|
|||
|
||||
icon_theme = gtk_icon_theme_get_default();
|
||||
gtk_icon_size_lookup(GTK_ICON_SIZE_LARGE_TOOLBAR, &w1, &h1);
|
||||
save = gtk_icon_theme_load_icon(icon_theme, GTK_STOCK_SAVE, w1, 0,
|
||||
save = gtk_icon_theme_load_icon(icon_theme, GTK_STOCK_SAVE, w1, GTK_ICON_LOOKUP_USE_BUILTIN,
|
||||
&error);
|
||||
|
||||
if (error) {
|
||||
|
@ -38,11 +38,16 @@ gm_pixbuf_create_save_close() {
|
|||
gm_debug_msg(DEBUG_DEFAULT, "Couldn't find save icon for the save and close composite icon");
|
||||
return gm_pixbuf_get("saveclose.xpm");
|
||||
}
|
||||
|
||||
|
||||
w1 = gdk_pixbuf_get_width(save);
|
||||
h1 = gdk_pixbuf_get_height(save);
|
||||
|
||||
pixbuf = gdk_pixbuf_copy(save);
|
||||
g_object_unref(save);
|
||||
|
||||
gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &w2, &h2);
|
||||
w2 = w1 / 2;
|
||||
h2 = h1 / 2;
|
||||
close = gtk_icon_theme_load_icon(icon_theme, GTK_STOCK_CLOSE, w2, 0,
|
||||
&error);
|
||||
|
||||
|
|
|
@ -497,14 +497,17 @@ gm_create_tab_label(const gchar *icon, const gchar *caption, gboolean has_exit,
|
|||
exit button if has_exit is true */
|
||||
GtkWidget *hboxTabLabel;
|
||||
gint h, w;
|
||||
|
||||
hboxTabLabel = gtk_hbox_new(FALSE, 3);
|
||||
GtkRcStyle *rcstyle;
|
||||
|
||||
hboxTabLabel = gtk_hbox_new(FALSE, 4);
|
||||
|
||||
gtk_widget_show(hboxTabLabel);
|
||||
|
||||
gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &w, &h);
|
||||
info->image_icon = gtk_image_new_from_pixbuf(
|
||||
gm_pixbuf_get_at_size(icon, 16, 16));
|
||||
gtk_widget_set_size_request(info->image_icon, 16, 16);
|
||||
gm_pixbuf_get_at_size(icon, w, h));
|
||||
|
||||
gtk_widget_set_size_request(info->image_icon, w, h);
|
||||
gtk_widget_show(info->image_icon);
|
||||
gtk_box_pack_start(GTK_BOX(hboxTabLabel), info->image_icon, TRUE, TRUE, 0);
|
||||
|
||||
|
@ -519,12 +522,16 @@ gm_create_tab_label(const gchar *icon, const gchar *caption, gboolean has_exit,
|
|||
gtk_box_pack_end(GTK_BOX(hboxTabLabel), info->button_exit , FALSE,
|
||||
FALSE, 0);
|
||||
|
||||
gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &w, &h);
|
||||
gtk_widget_set_size_request(info->button_exit , w + 2, h + 2);
|
||||
gtk_button_set_relief(GTK_BUTTON(info->button_exit ), GTK_RELIEF_NONE);
|
||||
gtk_button_set_relief(GTK_BUTTON(info->button_exit), GTK_RELIEF_NONE);
|
||||
gtk_button_set_focus_on_click(GTK_BUTTON(info->button_exit), FALSE);
|
||||
|
||||
info->image_exit = gtk_image_new_from_stock("gtk-close",
|
||||
gtk_widget_set_size_request(info->button_exit, w + 2, h + 2);
|
||||
|
||||
rcstyle = gtk_rc_style_new();
|
||||
rcstyle->xthickness = rcstyle->ythickness = 0;
|
||||
gtk_widget_modify_style(info->button_exit, rcstyle);
|
||||
gtk_rc_style_unref(rcstyle);
|
||||
|
||||
info->image_exit = gtk_image_new_from_stock(GTK_STOCK_CLOSE,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show(info->image_exit);
|
||||
gtk_container_add(GTK_CONTAINER(info->button_exit), info->image_exit);
|
||||
|
|
Reference in New Issue