summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorGeorge Lebl <jirka@5z.com>2000-08-04 21:27:35 +0000
committerGeorge Lebl <jirka@src.gnome.org>2000-08-04 21:27:35 +0000
commite00e0138b419627910df7f954017ee8f1eeba52a (patch)
treed8bf399bc3e0d370e0aec262c6b64c11ef3e4ea0 /components
parentafeb7b5c8fa2ce3bea5e7445566c7b90e2b5ce30 (diff)
downloadnautilus-e00e0138b419627910df7f954017ee8f1eeba52a.tar.gz
Only bugfixes so I suspect I'm allowed to check these in.
-George Fri Aug 04 14:21:51 2000 George Lebl <jirka@5z.com> * components/hardware/nautilus-hardware-view.c (setup_form_title): Check result of gnome_pixmap_file. If NULL, we can't make a new gnome-pixmap. * components/help/converters/gnome-db2html2/sect-elements.c (sect_get_infobox_logo) (sect_infobox_start_element): sect_get_infobox_logo can return a NULL so check its return and if NULL just add %s instead of <IMG ...> * components/services/vault/command-line/vault-operations.c, libnautilus-extensions/nautilus-list.c: add #include <string.h> * cut-n-paste-code/freetype/ftcalc.h, cut-n-paste-code/freetype/ftconfig.h: Well even though this is cut and paste code I NEED to add this patch for it to even compile on alpha, I'll try to get this upstream. The only changes are inside #ifdefs on platforms where long is 64 bit so it should not affect intel code at all. * libnautilus-extensions/nautilus-file-utilities.c (nautilus_format_uri_for_display): use g_strdup instead of strdup as then g_free is used and this would really confuse glib in memory checking mode. * librsvg/art_render_mask.c, librsvg/rsvg-bpath-util.c, librsvg/rsvg-ft.c: add #include <string.h> * src/Makefile.am: define NAUTILUS_PIXMAPDIR. This is neccessary for both making the tarballs and actual code sanity on switching toolbar themes etc. In GNOME 2.0 the GNOME_PATH can be sanely used to allow relocatable nautilus binary, but in 1.[02] this is the correct way to do things. * src/nautilus-complex-search-bar.c (nautilus_complex_search_bar_initialize) (load_find_them_pixmap_widget): If we can't load pixmaps don't add them. Also don't hardcode "/gnome/share" prefix and use the NAUTILUS_PIXMAPDIR define to find search.png AND make sure we can load it before using it. * src/nautilus-window-toolbars.c (find_toolbar_child) (setup_button) In toolbar_info use the NAUTILUS_PIXMAPDIR define to find pixmaps. remove get_stock_callback and get_stock_widget as those functions were an incredible hack and were likely to break. Replace with a function which searches the toolbar children and then finds correct icon widget. It also doesn't do anything if there is no icon. In setup button, use NAUTILUS_PIXMAPDIR to define pixmaps by their full name. If we cannot set the stock widget icon, then the icon is not registered and we register it with gnome-stock. Miraculously the current code worked but only worked because the eazel theme was set up in the toolbar_info, other themes with outside images would break.
Diffstat (limited to 'components')
-rw-r--r--components/hardware/nautilus-hardware-view.c12
-rw-r--r--components/help/converters/gnome-db2html2/sect-elements.c8
-rw-r--r--components/services/vault/command-line/vault-operations.c1
3 files changed, 15 insertions, 6 deletions
diff --git a/components/hardware/nautilus-hardware-view.c b/components/hardware/nautilus-hardware-view.c
index 4875b6137..66f19bcfc 100644
--- a/components/hardware/nautilus-hardware-view.c
+++ b/components/hardware/nautilus-hardware-view.c
@@ -282,12 +282,14 @@ setup_form_title (NautilusHardwareView *view, const char* image_name, const char
gtk_box_pack_start (GTK_BOX(view->details->form), temp_container, 0, 0, 4);
gtk_widget_show(temp_container);
- if (image_name) {
+ if (image_name != NULL) {
file_name = gnome_pixmap_file (image_name);
- temp_widget = GTK_WIDGET (gnome_pixmap_new_from_file (file_name));
- gtk_box_pack_start(GTK_BOX(temp_container), temp_widget, 0, 0, 8);
- gtk_widget_show(temp_widget);
- g_free (file_name);
+ if (file_name != NULL) {
+ temp_widget = GTK_WIDGET (gnome_pixmap_new_from_file (file_name));
+ gtk_box_pack_start(GTK_BOX(temp_container), temp_widget, 0, 0, 8);
+ gtk_widget_show(temp_widget);
+ g_free (file_name);
+ }
}
temp_widget = gtk_label_new (title_text);
diff --git a/components/help/converters/gnome-db2html2/sect-elements.c b/components/help/converters/gnome-db2html2/sect-elements.c
index ba34299ea..4c7c6e483 100644
--- a/components/help/converters/gnome-db2html2/sect-elements.c
+++ b/components/help/converters/gnome-db2html2/sect-elements.c
@@ -1108,6 +1108,7 @@ sect_programlisting_end_element (Context *context,
sect_print (context, "</pre>\n</td></tr>\n</table>\n");
}
+/* Note that this can return NULL if the file is not found */
static gchar *
sect_get_infobox_logo (const gchar *name)
{
@@ -1134,7 +1135,12 @@ sect_infobox_start_element (Context *context,
logo = sect_get_infobox_logo (name);
- sect_print (context, "<TABLE BORDER=\"0\" WIDTH=\"100%%\">\n<tr><TD WIDTH=\"25%%\" ALIGN=\"CENTER\" VALIGN=\"TOP\"><IMG ALT=\"%s\" SRC=\"%s\"><TH ALIGN=\"LEFT\" VALIGN=\"CENTER\"></TD>\n", name, logo);
+ sect_print (context, "<TABLE BORDER=\"0\" WIDTH=\"100%%\">\n<tr><TD WIDTH=\"25%%\" ALIGN=\"CENTER\" VALIGN=\"TOP\">");
+ if (logo != NULL)
+ sect_print (context, "<IMG ALT=\"%s\" SRC=\"%s\">", name, logo);
+ else
+ sect_print (context, "%s", name);
+ sect_print (context, "<TH ALIGN=\"LEFT\" VALIGN=\"CENTER\"></TD>\n");
sect_print (context, "<TD>&nbsp;</TD>\n<TD ALIGN=\"LEFT\" VALIGN=\"TOP\">\n");
g_free (logo);
}
diff --git a/components/services/vault/command-line/vault-operations.c b/components/services/vault/command-line/vault-operations.c
index 4256726a2..15a70610b 100644
--- a/components/services/vault/command-line/vault-operations.c
+++ b/components/services/vault/command-line/vault-operations.c
@@ -22,6 +22,7 @@
*/
#include <config.h>
+#include <string.h>
#include <unistd.h>
#include <glib.h>
#include <string.h>