Remove all g_print statements. (header_expose_cb): Fix pixbuf clipping.
2001-12-13 Richard Hestilow <hestilow@ximian.com> * capplet-dir-view-list.c: Remove all g_print statements. (header_expose_cb): Fix pixbuf clipping. * capplet-dir-view.c (capplet_dir_view_new): s/gtk_object_unref/g_object_unref. * main.c (main): s/bonobo_main/gtk_main.
This commit is contained in:
parent
18ba1f45f6
commit
83162b8039
4 changed files with 24 additions and 19 deletions
|
@ -1,3 +1,13 @@
|
|||
2001-12-13 Richard Hestilow <hestilow@ximian.com>
|
||||
|
||||
* capplet-dir-view-list.c: Remove all g_print statements.
|
||||
(header_expose_cb): Fix pixbuf clipping.
|
||||
|
||||
* capplet-dir-view.c (capplet_dir_view_new):
|
||||
s/gtk_object_unref/g_object_unref.
|
||||
|
||||
* main.c (main): s/bonobo_main/gtk_main.
|
||||
|
||||
2001-12-08 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* capplet-dir-view.c: remove unused include that broke stuff
|
||||
|
|
|
@ -184,7 +184,6 @@ sidebar_arrow_update (CappletDirView *view)
|
|||
GtkTreeIter iter;
|
||||
int enabled, i;
|
||||
|
||||
g_print ("Hi\n");
|
||||
if (!data->arrow)
|
||||
{
|
||||
gchar *file = g_concat_dir_and_file (ART_DIR, "active.png");
|
||||
|
@ -207,7 +206,6 @@ sidebar_arrow_update (CappletDirView *view)
|
|||
enabled++;
|
||||
}
|
||||
|
||||
g_print ("okay\n");
|
||||
for (i = 0, list = root; list; list = list->next)
|
||||
{
|
||||
CappletDirEntry *dir = CAPPLET_DIR_ENTRY (list->data);
|
||||
|
@ -225,7 +223,6 @@ sidebar_arrow_update (CappletDirView *view)
|
|||
}
|
||||
|
||||
g_slist_free_1 (root);
|
||||
g_print ("right\n");
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -234,7 +231,6 @@ sidebar_populate (CappletDirView *view)
|
|||
ListViewData *data = view->view_data;
|
||||
GSList *list, *root;
|
||||
|
||||
g_print ("Hi 2\n");
|
||||
if (data->sidebar_populated)
|
||||
{
|
||||
sidebar_arrow_update (view);
|
||||
|
@ -314,8 +310,6 @@ list_populate (CappletDirView *view)
|
|||
gnome_icon_list_insert_item (GNOME_ICON_LIST (view->view_data), i, item,
|
||||
CAPPLET_DIR_ENTRY (list->data)->label);
|
||||
#else
|
||||
g_print ("Icon: %s %s", CAPPLET_DIR_ENTRY (list->data)->icon,
|
||||
CAPPLET_DIR_ENTRY (list->data)->label);
|
||||
gnome_icon_list_insert (data->gil, i++,
|
||||
CAPPLET_DIR_ENTRY (list->data)->icon,
|
||||
CAPPLET_DIR_ENTRY (list->data)->label);
|
||||
|
@ -389,7 +383,7 @@ header_expose_cb (GtkWidget *darea, GdkEventExpose *event,
|
|||
{
|
||||
PangoContext *context = gtk_widget_get_pango_context (darea);
|
||||
PangoFontDescription *desc = pango_font_description_copy (darea->style->font_desc);
|
||||
pango_font_description_set_size (desc, 16);
|
||||
pango_font_description_set_size (desc, 16 * PANGO_SCALE);
|
||||
pango_font_description_set_weight (desc, PANGO_WEIGHT_BOLD);
|
||||
data->layout = pango_layout_new (context);
|
||||
pango_layout_set_font_description (data->layout, desc);
|
||||
|
@ -405,16 +399,17 @@ header_expose_cb (GtkWidget *darea, GdkEventExpose *event,
|
|||
event->area.x + event->area.width,
|
||||
y);
|
||||
}
|
||||
|
||||
gdk_pixbuf_render_to_drawable_alpha (data->header_logo,
|
||||
darea->window,
|
||||
event->area.x, event->area.y,
|
||||
event->area.x, event->area.y,
|
||||
MIN (gdk_pixbuf_get_width (data->header_logo), event->area.width),
|
||||
MIN (gdk_pixbuf_get_height (data->header_logo), event->area.height),
|
||||
GDK_PIXBUF_ALPHA_FULL, 255,
|
||||
GDK_RGB_DITHER_MAX,
|
||||
0, 0);
|
||||
|
||||
if (event->area.x < 48 && event->area.y < 48)
|
||||
gdk_pixbuf_render_to_drawable_alpha (data->header_logo,
|
||||
darea->window,
|
||||
event->area.x, event->area.y,
|
||||
event->area.x, event->area.y,
|
||||
MIN (gdk_pixbuf_get_width (data->header_logo) - event->area.x, event->area.width),
|
||||
MIN (gdk_pixbuf_get_height (data->header_logo) - event->area.y, event->area.height),
|
||||
GDK_PIXBUF_ALPHA_FULL, 255,
|
||||
GDK_RGB_DITHER_MAX,
|
||||
0, 0);
|
||||
|
||||
pango_layout_set_text (data->layout, data->header_text, -1);
|
||||
pango_layout_get_pixel_size (data->layout, &tw, &th);
|
||||
|
|
|
@ -359,7 +359,7 @@ capplet_dir_view_new (void)
|
|||
glade_xml_signal_connect_data (xml, "close_cb", GTK_SIGNAL_FUNC (close_cb), view);
|
||||
|
||||
glade_xml_signal_connect_data (xml, "about_menu_cb", GTK_SIGNAL_FUNC (about_menu_cb), view);
|
||||
gtk_object_unref (GTK_OBJECT (xml));
|
||||
g_object_unref (G_OBJECT (xml));
|
||||
|
||||
gtk_object_set (GTK_OBJECT (view), "layout", prefs->layout, NULL);
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ main (int argc, char **argv)
|
|||
gtk_idle_add ((GtkFunction) real_launch_control, capplet);
|
||||
}
|
||||
|
||||
bonobo_main ();
|
||||
gtk_main ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue