--- a/gf_gtkutils.c Sat Dec 27 17:20:58 2003 +0000
+++ b/gf_gtkutils.c Sat Dec 27 17:35:03 2003 +0000
@@ -9,13 +9,13 @@
**********************************************************************/
make_window_position_menu_item(gf_window_position item) {
- GtkWidget *item, *hbox, *image, *label = NULL;
+ GtkWidget *menu_item, *hbox, *image, *label = NULL; - item = gtk_menu_item_new();
+ menu_item = gtk_menu_item_new(); hbox = gtk_hbox_new(FALSE, 4);
- gtk_container_add(GTK_CONTAINER(item), hbox);
+ gtk_container_add(GTK_CONTAINER(menu_item), hbox); pixbuf = get_window_position_image(item);
image = gtk_image_new_from_pixbuf(pixbuf);
@@ -33,20 +33,20 @@
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+ gtk_widget_show_all(menu_item);
make_window_zoom_menu_item(gf_window_zoom item) {
- GtkWidget *item, *hbox, *image, *label = NULL:
+ GtkWidget *menu_item, *hbox, *image, *label = NULL; - item = gtk_menu_item_new();
+ menu_item = gtk_menu_item_new(); hbox = gtk_hbox_new(FALSE, 4);
- gtk_container_add(GTK_CONTAINER(item), hbox);
+ gtk_container_add(GTK_CONTAINER(menu_item), hbox); pixbuf = get_window_zoom_image(item);
image = gtk_image_new_from_pixbuf(pixbuf);
@@ -68,19 +68,19 @@
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+ gtk_widget_show_all(menu_item);
make_window_mouse_menu_item(gf_window_mouse item) {
- GtkWidget *item, *hbox, *image, *label = NULL:
+ GtkWidget *menu_item, *hbox, *label = NULL; - item = gtk_menu_item_new();
+ menu_item = gtk_menu_item_new(); hbox = gtk_hbox_new(FALSE, 4);
- gtk_container_add(GTK_CONTAINER(item), hbox);
+ gtk_container_add(GTK_CONTAINER(menu_item), hbox); case window_mouse_destroy: label = gtk_label_new("Close Window"); break;
@@ -91,25 +91,25 @@
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_box_pack_start(GTK_BOX(hbox), item, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+ gtk_widget_show_all(menu_item);
make_item_position_menu_item(gf_item_position item) {
- GtkWidget *item, *hbox, *image, *label = NULL:
+ GtkWidget *menu_item, *hbox, *image, *label = NULL; - item = gtk_menu_item_new();
+ menu_item = gtk_menu_item_new(); hbox = gtk_hbox_new(FALSE, 4);
- gtk_container_add(GTK_CONTAINER(item), hbox);
+ gtk_container_add(GTK_CONTAINER(menu_item), hbox); pixbuf = get_item_position_image(item);
- gtk_image_new_from_pixbuf(pixbuf);
+ image = gtk_image_new_from_pixbuf(pixbuf); gtk_box_pack_start(GTK_BOX(hbox), image, FALSE, FALSE, 0);
@@ -127,25 +127,25 @@
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_box_pack_start(GTK_BOX(hbox), item, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+ gtk_widget_show_all(menu_item);
make_text_clipping_menu_item(gf_text_clipping item) {
- GtkWidget *item, *hbox, *image, *label = NULL:
+ GtkWidget *menu_item, *hbox, *image, *label = NULL; - item = gtk_menu_item_new();
+ menu_item = gtk_menu_item_new(); hbox = gtk_hbox_new(FALSE, 4);
- gtk_container_add(GTK_CONTAINER(item), hbox);
+ gtk_container_add(GTK_CONTAINER(menu_item), hbox); pixbuf = get_text_clipping_image(item);
- gtk_image_new_from_pixbuf(pixbuf);
+ image = gtk_image_new_from_pixbuf(pixbuf); gtk_box_pack_start(GTK_BOX(hbox), image, FALSE, FALSE, 0);
@@ -158,25 +158,25 @@
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_box_pack_start(GTK_BOX(hbox), item, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+ gtk_widget_show_all(menu_item);
make_icon_size_menu_item(gf_icon_size item) {
- GtkWidget *item, *hbox, *image, *label = NULL:
+ GtkWidget *menu_item, *hbox, *image, *label = NULL; - item = gtk_menu_item_new();
+ menu_item = gtk_menu_item_new(); hbox = gtk_hbox_new(FALSE, 4);
- gtk_container_add(GTK_CONTAINER(item), hbox);
+ gtk_container_add(GTK_CONTAINER(menu_item), hbox); pixbuf = get_icon_size_image(item);
- gtk_image_new_from_pixbuf(pixbuf);
+ image = gtk_image_new_from_pixbuf(pixbuf); gtk_box_pack_start(GTK_BOX(hbox), image, FALSE, FALSE, 0);
@@ -190,11 +190,11 @@
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_box_pack_start(GTK_BOX(hbox), item, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+ gtk_widget_show_all(menu_item);
/***********************************************************************
--- a/gf_pngs.c Sat Dec 27 17:20:58 2003 +0000
+++ b/gf_pngs.c Sat Dec 27 17:35:03 2003 +0000
@@ -145,16 +145,16 @@
- case window_position_north_west:
+ case window_position_nw: ret = gdk_pixbuf_new_from_file(g_build_filename(gf_get_image_dir(), "conf", "window_position_north_west.png", NULL), NULL);
- case window_position_north_east:
+ case window_position_ne: ret = gdk_pixbuf_new_from_file(g_build_filename(gf_get_image_dir(), "conf", "window_position_north_east.png", NULL), NULL);
- case window_position_south_west:
+ case window_position_sw: ret = gdk_pixbuf_new_from_file(g_build_filename(gf_get_image_dir(), "conf", "window_position_south_west.png", NULL), NULL);
- case window_position_south_east:
+ case window_position_se: ret = gdk_pixbuf_new_from_file(g_build_filename(gf_get_image_dir(), "conf", "window_position_south_east.png", NULL), NULL);
--- a/gf_utils.c Sat Dec 27 17:20:58 2003 +0000
+++ b/gf_utils.c Sat Dec 27 17:35:03 2003 +0000
@@ -51,11 +51,11 @@
gtk_widget_size_request(window, &req);
switch(gaim_prefs_get_int(GF_PREF_BEHAVIOR_WINDOW_POS)) {
+ case window_position_nw: + case window_position_sw:
+ case window_position_ne: + case window_position_se: return gdk_screen_width() - req.width;
@@ -68,11 +68,11 @@
gtk_widget_size_request(window, &req);
switch(gaim_prefs_get_int(GF_PREF_BEHAVIOR_WINDOW_POS)) {
+ case window_position_ne: + case window_position_nw:
+ case window_position_se: + case window_position_sw: return gdk_screen_height() - req.height;
@@ -164,35 +164,35 @@
gfloat owidth = image_size.width, oheight = image_size.height;
switch(gaim_prefs_get_int(GF_PREF_BEHAVIOR_ZOOM)) {
height = oheight * 1.75f;
height = oheight * 1.25f;
height = oheight * 0.75f;
height = oheight * 0.25f;
@@ -222,7 +222,7 @@
pango_layout_get_pixel_size(lay, &width, NULL);
if ((width + offset) > dim.width) {
switch (gaim_prefs_get_int(GF_PREF_APPEARANCE_TEXT_CLIPPING)) {
+ case text_clipping_truncate: pango_layout_get_pixel_size(lay, &width, NULL);
@@ -237,7 +237,7 @@
- case clip_elipse_start:
+ case text_clipping_elipse_start: pango_layout_get_pixel_size(lay, &width, NULL);
@@ -255,7 +255,7 @@
- case clip_elipse_middle:
+ case text_clipping_elipse_middle: pango_layout_get_pixel_size(lay, &width, NULL);
@@ -286,7 +286,7 @@
+ case text_clipping_elipse_end: pango_layout_get_pixel_size(lay, &width, NULL);
@@ -353,11 +353,11 @@
switch (gaim_prefs_get_int(GF_PREF_APPEARANCE_PROT_SIZE)) {
- case isize_tiny: return 16; break;
- case isize_small: return 24; break;
- case isize_normal: return 48; break;
- case isize_large: return 96; break;
- case isize_huge: return 144; break;
+ case icon_size_tiny: return 16; break; + case icon_size_small: return 24; break; + case icon_size_normal: return 48; break; + case icon_size_large: return 96; break; + case icon_size_huge: return 144; break; @@ -394,15 +394,15 @@
lon = dhw - (hw + ohx); /* x */
switch (gaim_prefs_get_int(GF_PREF_APPEARANCE_TEXT_POS)) {
- case tpos_nw: (*x) = west; (*y) = north; break;
- case tpos_n: (*x) = lon; (*y) = north; break;
- case tpos_ne: (*x) = east; (*y) = north; break;
- case tpos_w: (*x) = west; (*y) = lat; break;
- case tpos_c: (*x) = lon; (*y) = lat; break;
- case tpos_e: (*x) = east; (*y) = lat; break;
- case tpos_sw: (*x) = west; (*y) = south; break;
- case tpos_s: (*x) = lon; (*y) = south; break;
- case tpos_se: (*x) = east; (*y) = south; break;
+ case item_position_nw: (*x) = west; (*y) = north; break; + case item_position_n: (*x) = lon; (*y) = north; break; + case item_position_ne: (*x) = east; (*y) = north; break; + case item_position_w: (*x) = west; (*y) = lat; break; + case item_position_c: (*x) = lon; (*y) = lat; break; + case item_position_e: (*x) = east; (*y) = lat; break; + case item_position_sw: (*x) = west; (*y) = south; break; + case item_position_s: (*x) = lon; (*y) = south; break; + case item_position_se: (*x) = east; (*y) = south; break; /**********************************************************************/
@@ -437,16 +437,15 @@
lon = dhw - (hw + ohx); /* x */
switch (gaim_prefs_get_int(GF_PREF_APPEARANCE_PROT_POS)) {
- case ipos_none: (*x) = -1; (*y) = -1; break;
- case ipos_nw: (*x) = west; (*y) = north; break;
- case ipos_n: (*x) = lon; (*y) = north; break;
- case ipos_ne: (*x) = east; (*y) = north; break;
- case ipos_w: (*x) = west; (*y) = lat; break;
- case ipos_c: (*x) = lon; (*y) = lat; break;
- case ipos_e: (*x) = east; (*y) = lat; break;
- case ipos_sw: (*x) = west; (*y) = south; break;
- case ipos_s: (*x) = lon; (*y) = south; break;
- case ipos_se: (*x) = east; (*y) = south; break;
+ case item_position_nw: (*x) = west; (*y) = north; break; + case item_position_n: (*x) = lon; (*y) = north; break; + case item_position_ne: (*x) = east; (*y) = north; break; + case item_position_w: (*x) = west; (*y) = lat; break; + case item_position_c: (*x) = lon; (*y) = lat; break; + case item_position_e: (*x) = east; (*y) = lat; break; + case item_position_sw: (*x) = west; (*y) = south; break; + case item_position_s: (*x) = lon; (*y) = south; break; + case item_position_se: (*x) = east; (*y) = south; break; /**********************************************************************/