grim/guifications1

just a few more files...

2003-12-27, grim
74b8d6dfd0ca
Parents 7124a5c002dc
Children e1136acb7b9e
just a few more files...
  • +37 -37
    gf_gtkutils.c
  • +4 -4
    gf_pngs.c
  • +43 -44
    gf_utils.c
  • --- 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 @@
    **********************************************************************/
    static GtkWidget *
    make_window_position_menu_item(gf_window_position item) {
    - GtkWidget *item, *hbox, *image, *label = NULL;
    + GtkWidget *menu_item, *hbox, *image, *label = NULL;
    GdkPixbuf *pixbuf;
    - 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(item);
    + gtk_widget_show_all(menu_item);
    - return item;
    + return menu_item;
    }
    static GtkWidget *
    make_window_zoom_menu_item(gf_window_zoom item) {
    - GtkWidget *item, *hbox, *image, *label = NULL:
    + GtkWidget *menu_item, *hbox, *image, *label = NULL;
    GdkPixbuf *pixbuf;
    - 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(item);
    + gtk_widget_show_all(menu_item);
    - return item;
    + return menu_item;
    }
    static GtkWidget *
    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);
    switch (item) {
    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(item);
    + gtk_widget_show_all(menu_item);
    - return item;
    + return menu_item;
    }
    static GtkWidget *
    make_item_position_menu_item(gf_item_position item) {
    - GtkWidget *item, *hbox, *image, *label = NULL:
    + GtkWidget *menu_item, *hbox, *image, *label = NULL;
    GdkPixbuf *pixbuf;
    - 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);
    if (pixbuf != NULL)
    g_object_unref(pixbuf);
    @@ -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(item);
    + gtk_widget_show_all(menu_item);
    - return item;
    + return menu_item;
    }
    static GtkWidget *
    make_text_clipping_menu_item(gf_text_clipping item) {
    - GtkWidget *item, *hbox, *image, *label = NULL:
    + GtkWidget *menu_item, *hbox, *image, *label = NULL;
    GdkPixbuf *pixbuf;
    - 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);
    if (pixbuf != NULL)
    g_object_unref(pixbuf);
    @@ -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(item);
    + gtk_widget_show_all(menu_item);
    - return item;
    + return menu_item;
    }
    static GtkWidget *
    make_icon_size_menu_item(gf_icon_size item) {
    - GtkWidget *item, *hbox, *image, *label = NULL:
    + GtkWidget *menu_item, *hbox, *image, *label = NULL;
    GdkPixbuf *pixbuf;
    - 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);
    if (pixbuf != NULL)
    g_object_unref(pixbuf);
    @@ -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(item);
    + gtk_widget_show_all(menu_item);
    - return item;
    + return menu_item;
    }
    /***********************************************************************
    * export
    --- 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 @@
    GdkPixbuf *ret;
    switch(position) {
    - 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);
    break;
    - 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);
    break;
    - 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);
    break;
    - 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);
    break;
    default:
    --- 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 gfpos_nw:
    - case gfpos_sw:
    + case window_position_nw:
    + case window_position_sw:
    return 0;
    - case gfpos_ne:
    - case gfpos_se:
    + case window_position_ne:
    + case window_position_se:
    return gdk_screen_width() - req.width;
    }
    return 0;
    @@ -68,11 +68,11 @@
    gtk_widget_size_request(window, &req);
    switch(gaim_prefs_get_int(GF_PREF_BEHAVIOR_WINDOW_POS)) {
    - case gfpos_ne:
    - case gfpos_nw:
    + case window_position_ne:
    + case window_position_nw:
    return 0;
    - case gfpos_se:
    - case gfpos_sw:
    + case window_position_se:
    + case window_position_sw:
    return gdk_screen_height() - req.height;
    }
    return 0;
    @@ -164,35 +164,35 @@
    gfloat owidth = image_size.width, oheight = image_size.height;
    switch(gaim_prefs_get_int(GF_PREF_BEHAVIOR_ZOOM)) {
    - case zoom_200:
    + case window_zoom_200:
    width = owidth * 2.0f;
    height = oheight * 2.0f;
    break;
    - case zoom_175:
    + case window_zoom_175:
    width = owidth * 1.75f;
    height = oheight * 1.75f;
    break;
    - case zoom_150:
    + case window_zoom_150:
    width = owidth * 1.5f;
    height = oheight * 1.5f;
    break;
    - case zoom_125:
    + case window_zoom_125:
    width = owidth * 1.25f;
    height = oheight * 1.25f;
    break;
    - case zoom_75:
    + case window_zoom_75:
    width = owidth * 0.75f;
    height = oheight * 0.75f;
    break;
    - case zoom_50:
    + case window_zoom_50:
    width = owidth * 0.5f;
    height = oheight * 0.5f;
    break;
    - case zoom_25:
    + case window_zoom_25:
    width = owidth * 0.25f;
    height = oheight * 0.25f;
    break;
    - case zoom_100:
    + case window_zoom_100:
    default:
    width = owidth;
    height = oheight;
    @@ -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 clip_truncate:
    + case text_clipping_truncate:
    while (loop) {
    pango_layout_get_pixel_size(lay, &width, NULL);
    @@ -237,7 +237,7 @@
    g_free(new_text);
    break;
    - case clip_elipse_start:
    + case text_clipping_elipse_start:
    while (loop) {
    pango_layout_get_pixel_size(lay, &width, NULL);
    @@ -255,7 +255,7 @@
    g_free(new_text);
    break;
    - case clip_elipse_middle:
    + case text_clipping_elipse_middle:
    while (loop) {
    pango_layout_get_pixel_size(lay, &width, NULL);
    @@ -286,7 +286,7 @@
    g_free(new_text);
    break;
    - case clip_elipse_end:
    + case text_clipping_elipse_end:
    while (loop) {
    pango_layout_get_pixel_size(lay, &width, NULL);
    @@ -353,11 +353,11 @@
    gint
    get_proto_icon_size() {
    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;
    }
    return 0;
    }
    @@ -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;
    }
    }
    /**********************************************************************/