Commit 77f02d60 authored by Martin Baulig's avatar Martin Baulig Committed by Martin Baulig

#ifdef FIXME some stuff.

2001-08-11  Martin Baulig  <baulig@suse.de>

	* menu-properties.[ch]: #ifdef FIXME some stuff.

	* scroll-menu.[ch]: Ported to GTK+ 2.0.

	* swallow.[ch]: Ported to GTK+ 2.0, but `#ifdef FIXME'.
parent f12f582f
2001-08-11 Martin Baulig <baulig@suse.de>
* menu-properties.[ch]: #ifdef FIXME some stuff.
* scroll-menu.[ch]: Ported to GTK+ 2.0.
* swallow.[ch]: Ported to GTK+ 2.0, but `#ifdef FIXME'.
2001-08-11 Martin Baulig <baulig@suse.de>
* Makefile.am: Disable the gwmh stuff for the moment and
......
......@@ -169,6 +169,12 @@ panel_temp_SOURCES=\
menu-rh.h \
menu-fentry.c \
menu-fentry.h \
swallow.c \
swallow.h \
scroll-menu.h \
scroll-menu.c \
menu-properties.c \
menu-properties.h \
$(NULL)
panel_temp_LDADD=\
......@@ -177,18 +183,12 @@ panel_temp_LDADD=\
panel_SOURCES=\
things-will-not-compile-below-this-line \
menu-properties.c \
menu-properties.h \
launcher.c \
launcher.h \
extern.c \
extern.h \
swallow.c \
swallow.h \
gnome-run.c \
gnome-run.h \
scroll-menu.h \
scroll-menu.c \
icon-entry-hack.c \
icon-entry-hack.h
......
......@@ -91,9 +91,10 @@ get_pixmap(const char *menudir, gboolean main_menu)
char *pixmap_name = NULL;
if (main_menu) {
pixmap_name = gnome_unconditional_pixmap_file("gnome-logo-icon-transparent.png");
#ifdef FIXME
} else {
char *dentry_name;
GnomeDesktopEntry *item_info;
GnomeDesktopItem *item_info;
dentry_name = g_concat_dir_and_file (menudir,
".directory");
......@@ -108,6 +109,7 @@ get_pixmap(const char *menudir, gboolean main_menu)
if (item_info)
gnome_desktop_entry_free(item_info);
#endif
}
return pixmap_name;
}
......@@ -139,6 +141,7 @@ got_gmenu (void)
static void
properties_apply_callback (Menu *menu)
{
#ifdef FIXME
char *s;
gboolean bool;
gboolean change_icon = FALSE;
......@@ -295,6 +298,7 @@ properties_apply_callback (Menu *menu)
button_widget_set_pixmap(BUTTON_WIDGET(menu->button),
pixmap_name, -1);
}
#endif
}
static void
......@@ -424,6 +428,7 @@ add_menu_type_options(Menu *menu, GtkObject *dialog, GtkTable *table, int row,
static void
dialog_clicked (GtkWidget *widget, int button, gpointer data)
{
#ifdef FIXME
Menu *menu = data;
if (button == 0 /* close */) {
......@@ -434,11 +439,13 @@ dialog_clicked (GtkWidget *widget, int button, gpointer data)
else
panel_show_help ("menus.html");
}
#endif
}
static GtkWidget *
create_properties_dialog(Menu *menu)
{
#ifdef FIXME
GtkWidget *dialog, *notebook;
GtkWidget *vbox;
GtkWidget *box;
......@@ -659,6 +666,9 @@ create_properties_dialog(Menu *menu)
menu);
return dialog;
#else
return NULL;
#endif
}
void
......
......@@ -52,8 +52,8 @@ scroll_menu_get_type (void)
sizeof (ScrollMenuClass),
(GtkClassInitFunc) scroll_menu_class_init,
(GtkObjectInitFunc) scroll_menu_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
NULL,
NULL,
NULL
};
......@@ -454,9 +454,9 @@ scroll_menu_size_allocate (GtkWidget *widget,
if (menu_shell->children) {
child_allocation.x = (GTK_CONTAINER (menu)->border_width +
widget->style->klass->xthickness);
widget->style->xthickness);
child_allocation.y = (GTK_CONTAINER (menu)->border_width +
widget->style->klass->ythickness) - self->offset + top_scroller_height;
widget->style->ythickness) - self->offset + top_scroller_height;
child_allocation.width = MAX (1, (gint)allocation->width - child_allocation.x * 2);
children = menu_shell->children;
......@@ -527,11 +527,11 @@ adjust_item (ScrollMenu *self, GtkWidget *widget)
return;
top = (GTK_CONTAINER (self)->border_width +
menu->style->klass->ythickness);
menu->style->ythickness);
bottom = menu->allocation.height -
(GTK_CONTAINER (self)->border_width +
menu->style->klass->ythickness);
menu->style->ythickness);
gtk_widget_get_child_requisition (self->up_scroll, &requisition);
top += requisition.height;
......
......@@ -16,6 +16,8 @@
#include <gdk/gdkx.h>
#include <X11/Xlib.h>
#include <gnome-desktop/gnome-ditem.h>
#include "panel-include.h"
#include "panel-widget.h"
......@@ -52,9 +54,10 @@ socket_realized (GtkWidget *w, gpointer data)
static void
swallow_launch (Swallow *swallow)
{
#ifdef FIXME
if ( ! string_empty (swallow->path)) {
char *p = strrchr (swallow->path, '.');
GnomeDestkopItem *item;
GnomeDesktopItem *item;
/*only if such a file exists and ends in a .desktop, should
we try to launch it as such*/
......@@ -75,11 +78,13 @@ swallow_launch (Swallow *swallow)
gnome_execute_shell (g_get_home_dir (), swallow->path);
}
}
#endif
}
static gboolean
before_remove (Swallow *swallow)
{
#ifdef FIXME
GtkWidget *dlg;
if (swallow->clean_remove)
......@@ -128,6 +133,7 @@ before_remove (Swallow *swallow)
return FALSE;
}
#endif
return TRUE;
}
......@@ -220,6 +226,7 @@ act_really_add_swallow(GtkWidget *w, gpointer data)
void
ask_about_swallowing(PanelWidget *panel, int pos, gboolean exactpos)
{
#ifdef FIXME
GtkWidget *d;
GtkWidget *title_e;
......@@ -305,6 +312,7 @@ ask_about_swallowing(PanelWidget *panel, int pos, gboolean exactpos)
gtk_widget_show_all (d);
panel_set_dialog_layer (d);
#endif
}
static int
......@@ -323,7 +331,7 @@ ignore_1st_click(GtkWidget *widget, GdkEvent *event)
}
static Swallow *
create_swallow_applet(char *title, char *path, int width, int height, SwallowOrient orient)
create_swallow_applet(const char *title, const char *path, int width, int height, SwallowOrient orient)
{
Swallow *swallow;
......@@ -402,7 +410,7 @@ set_swallow_applet_orient(Swallow *swallow, SwallowOrient orient)
}
void
load_swallow_applet (char *path, char *params, int width, int height,
load_swallow_applet (const char *path, const char *params, int width, int height,
PanelWidget *panel, int pos, gboolean exactpos)
{
Swallow *swallow;
......@@ -422,7 +430,7 @@ load_swallow_applet (char *path, char *params, int width, int height,
swallow->clean_remove = FALSE;
applet_add_callback (applets_last->data, "help",
GNOME_STOCK_PIXMAP_HELP,
GTK_STOCK_HELP,
_("Help"));
swallow_launch (swallow);
......
......@@ -25,7 +25,7 @@ typedef struct {
gboolean clean_remove;
} Swallow;
void load_swallow_applet(char *path, char *params, int width, int height,
void load_swallow_applet(const char *path, const char *params, int width, int height,
PanelWidget *panela, int pos, gboolean exactpos);
void set_swallow_applet_orient(Swallow *swallow, SwallowOrient orient);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment